I am beginner with Postgres. I want to select the rows where Today is greater than an Array of Dates that I have stored.
This is what i wrote which does not work (error)
SELECT
bool_or(now()::date @> a_date) AS some_of_the_dates_lies_within_range
FROM
(SELECT unnest(dateofdeparture) AS a_date from alerts) as S0;
This is how my row is
SELECT unnest(dateofdeparture) AS a_date from alerts
a_date
2019-01-12
2019-01-13
2019-01-14
2019-01-15
2019-01-16
2019-01-17
2019-01-18
Any pointers help would be much appreciated.