On 04/29/2010 05:08 PM, Thomas Kellerer wrote:
SELECT organization, state, lastdate, age(lastdate)
FROM (
   SELECT organization,
          state,
          (select max(idate) from times where
customers.custid=times.custid and taskid = 27) as lastdate
   FROM customers
) t
order by lastdate desc

Ah, yes, that does work, very nice.  Thank you.

-Andy

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to