Greg Stark wrote:
>
> Try either of:
>
> SELECT max(req1, req2, req3) AS max FROM invoices WHERE max(req1, req2, req3) <= now()
Ok, that works. But why can't I alias the result of the max() function
and use the alias in the where clause? Something like:
SELECT max(r1,r2,r3) as max from invoices WHERE max <= now();
Why can't postgres see the alias when inside the WHERE clause?
Jc