Re: [GENERAL] A challenge for the SQL gurus out there...

2008-09-08 Thread Merlin Moncure
On Mon, Sep 8, 2008 at 9:49 PM, Merlin Moncure <[EMAIL PROTECTED]> wrote: > On Sun, Sep 7, 2008 at 6:09 AM, Gregory Stark <[EMAIL PROTECTED]> wrote: >> "Uwe C. Schroeder" <[EMAIL PROTECTED]> writes: >> >>> I want to get a list looking like >>> >>> forum idthread_id post_id >>> 1 6

Re: [GENERAL] A challenge for the SQL gurus out there...

2008-09-08 Thread Merlin Moncure
On Sun, Sep 7, 2008 at 6:09 AM, Gregory Stark <[EMAIL PROTECTED]> wrote: > "Uwe C. Schroeder" <[EMAIL PROTECTED]> writes: > >> I want to get a list looking like >> >> forum idthread_id post_id >> 1 6 443 >> 2 9 123 >> 3 3 557 > ... >> It all

Re: [GENERAL] A challenge for the SQL gurus out there...

2008-09-07 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, "Uwe C. Schroeder" <[EMAIL PROTECTED]> writes: > or maybe not and I'm just not getting it. > So here's the scenario: > I have 3 tables > forum: with primary key "id" > forum_thread: again primary key "id" and a foreign key "forum_id" referencing > th primary key

Re: [GENERAL] A challenge for the SQL gurus out there...

2008-09-07 Thread Uwe C. Schroeder
On Sunday 07 September 2008, Gregory Stark wrote: > "Uwe C. Schroeder" <[EMAIL PROTECTED]> writes: > > I want to get a list looking like > > > > forum idthread_id post_id > > 1 6 443 > > 2 9 123 > > 3 3 557 > > ... > > > It all boils down

Re: [GENERAL] A challenge for the SQL gurus out there...

2008-09-07 Thread Gregory Stark
"Uwe C. Schroeder" <[EMAIL PROTECTED]> writes: > I want to get a list looking like > > forum idthread_id post_id > 1 6 443 > 2 9 123 > 3 3 557 ... > It all boils down to me not being able to come up with a query that gives me > the latest

[GENERAL] A challenge for the SQL gurus out there...

2008-09-07 Thread Uwe C. Schroeder
or maybe not and I'm just not getting it. So here's the scenario: I have 3 tables forum: with primary key "id" forum_thread: again primary key "id" and a foreign key "forum_id" referencing th primary key of the forum table forum_post: again primary key "id" with a forign key "thread_id" referen