I'm pretty sure this has been asked before but I am struggling to get the correct syntax for a table containing data like
id  date        type                                    report  item_id
1   2018-11-07  Veröffentlichung des 9-Monats-Berichtes TRUE    16
2   2018-11-06  Veröffentlichung des 9-Monats-Berichtes TRUE    17
3   2019-03-07  Veröffentlichung des Jahresberichtes    TRUE    17
4   2019-05-10  Bericht zum 1. Quartal                  TRUE    17
The query I am trying to formulate is
SELECT date, AGE(now(), date) as t1
FROM dates
WHERE t1 > 0
Meaning I am only looking for values in the past.
However, I get an error
ERROR: column "t1" does not exist
(of course, it is an alias). Does Postgresql not support aliases here?
 
     
    