Re: Getting a sample data set.
От | James B. Byrne |
---|---|
Тема | Re: Getting a sample data set. |
Дата | |
Msg-id | 43506.216.185.71.25.1295377152.squirrel@webmail.harte-lyne.ca обсуждение исходный текст |
Ответ на | Re: Getting a sample data set. (Alban Hertroys <dalroi@solfertje.student.utwente.nl>) |
Ответы |
Re: Getting a sample data set.
|
Список | pgsql-general |
On Tue, January 18, 2011 13:23, Alban Hertroys wrote: > > > Standard SQL alternatives tend to get complex, using self-joins to > weed out all the records you don't want (the exact term for such > joins escapes me right now, that would help with Googling if you're > looking for examples). Would the term be a grouped self join? > Basically you do something like: > SELECT s1.mode > FROM shipments AS s1 > WHERE NOT EXISTS ( > SELECT NULL > FROM shipments AS s2 > WHERE s1.mode = s2.mode > AND s1.somecolumn < s2.somecolumn > ) > I can see the motivation for something like DISTINCT ON. I take it that this syntax is peculiar to PostgreSQL?: -- *** E-Mail is NOT a SECURE channel *** James B. Byrne mailto:ByrneJB@Harte-Lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3
В списке pgsql-general по дате отправления: