| From: | Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl> |
|---|---|
| To: | byrnejb(at)harte-lyne(dot)ca |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Getting a sample data set. |
| Date: | 2011-01-18 19:28:07 |
| Message-ID: | 0A7F7B56-42FF-4079-8A8A-C394E02FBBC9@solfertje.student.utwente.nl |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On 18 Jan 2011, at 19:59, James B. Byrne wrote:
>
> 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?
Nope, but some Googling put me on the right track. It's called a correlated subquery.
> I can see the motivation for something like DISTINCT ON. I take it
> that this syntax is peculiar to PostgreSQL?:
I suppose you meant particular? Yes, definitely. Although I'm sure some would find it peculiar as well :)
Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll see there is no forest.
!DSPAM:737,4d35e9d011708045415059!
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jeff Davis | 2011-01-18 19:29:09 | Re: Need help writing exclusion constraint |
| Previous Message | Jeff Davis | 2011-01-18 19:23:22 | Re: Need help writing exclusion constraint |