Re: Problems with HAVING

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: Problems with HAVING
Дата
Msg-id 20050112174130.GA95306@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: Problems with HAVING  (Michael Fuhr <mike@fuhr.org>)
Ответы Re: Problems with HAVING  (Kaloyan Iliev Iliev <news1@faith.digsys.bg>)
Список pgsql-sql
On Wed, Jan 12, 2005 at 10:11:21AM -0700, Michael Fuhr wrote:
> On Wed, Jan 12, 2005 at 06:38:51PM +0200, Kaloyan Iliev Iliev wrote:
> 
> > My problem is that I want to select the row with max(date) but also 
> > limited with where clauses.
> 
> If you don't mind using a non-standard feature then try SELECT
> DISTINCT ON (not just DISTINCT, but DISTINCT ON):

Sorry, I probably didn't read your message closely enough.  If you
just want a single record then ORDER BY ... LIMIT 1 might be more
appropriate.

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/


В списке pgsql-sql по дате отправления:

Предыдущее
От: Sam Mason
Дата:
Сообщение: Re: Problems with HAVING
Следующее
От: Bradley Miller
Дата:
Сообщение: Recursive query to be used in another result ?