Re: Grouping Too Closely

Поиск
Список
Период
Сортировка
Искать
От
Thomas F. O'Connell
Тема
Re: Grouping Too Closely
Дата
Msg-id
62592AAD-20CB-42EC-B599-E1D42D16A7BC@sitening.com
Ответ на
Re: Grouping Too Closely (Greg Sabino Mullane)
Список
Дерево обсуждения
Grouping Too Closely "Thomas F. O'Connell" <tfo@sitening.com>
Re: Grouping Too Closely "Greg Sabino Mullane" <greg@turnstep.com>
Re: Grouping Too Closely "Thomas F. O'Connell" <tfo@sitening.com>
Re: Grouping Too Closely "Greg Sabino Mullane" <greg@turnstep.com>
assorted problems with intarray and other GiST contribs. PFC <lists@boutiquenumerique.com>
Re: assorted problems with intarray and other GiST contribs. Michael Fuhr <mike@fuhr.org>
Re: assorted problems with intarray and other GiST contribs. PFC <lists@boutiquenumerique.com>
Re: assorted problems with intarray and other GiST contribs. Oleg Bartunov <oleg@sai.msu.su>
Re: Grouping Too Closely "Russell Simpkins" <russellsimpkins@hotmail.com>
This doesn't give me quite what I'm looking for because I need there  
to be only one of each possible value of seq2 to be returned for each  
value of fkey.

--
Thomas F. O'Connell
Co-Founder, Information Architect
Sitening, LLC

Strategic Open Source: Open Your i™

http://www.sitening.com/
110 30th Avenue North, Suite 6
Nashville, TN 37203-6320
615-260-0005

On Jun 24, 2005, at 11:22 PM, Greg Sabino Mullane wrote:

>> What I'd like to be able to do is select all records corresponding to
>> the minimum value of seq1 for each value of seq2 corresponding to a
>> given fkey (with a lower bound on the value of seq2).
>
> I'm not sure how uid figures in, but would this do what you want?:
>
> SELECT fkey, uid, seq2, min(seq1)
> FROM my_table
> WHERE seq2 > 2
> GROUP BY fkey, uid, seq2
> ORDER BY 1,2,3;

В списке pgsql-sql по дате отправления
От: Greg Sabino Mullane
Дата:
Сообщение: Re: Grouping Too Closely
От: Greg Sabino Mullane
Дата:
Сообщение: Re: Grouping Too Closely
FAQ