Re: sql help, reusing a column

Поиск
Список
Период
Сортировка
От Andy Colson
Тема Re: sql help, reusing a column
Дата
Msg-id 4BDA3986.9030109@squeakycode.net
обсуждение исходный текст
Ответ на Re: sql help, reusing a column  (Thomas Kellerer <spam_eater@gmx.net>)
Список 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 по дате отправления:

Предыдущее
От: DM
Дата:
Сообщение: Re: PostgreSQL Performance issue
Следующее
От: Jaime Rodriguez
Дата:
Сообщение: Re: Performance and Clustering