Re: sql help, reusing a column - Mailing list pgsql-general

From Andy Colson
Subject Re: sql help, reusing a column
Date
Msg-id 4BDA3986.9030109@squeakycode.net
Whole thread Raw
In response to Re: sql help, reusing a column  (Thomas Kellerer <spam_eater@gmx.net>)
List pgsql-general
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

pgsql-general by date:

Previous
From: DM
Date:
Subject: Re: PostgreSQL Performance issue
Next
From: Jaime Rodriguez
Date:
Subject: Re: Performance and Clustering