Re: trouble with group by and similar tables

2008-06-30 Thread Joerg Bruehe
Eben, all, I'm very sorry this got out of sight for so long :-( When I first read your mail, I had no idea, and then it was hidden. Just now, I check it again and detect what may explain this. I quote nearly the full mail leading to this, so that you readers need not scan your archives. Ebe

Re: trouble with group by and similar tables

2008-06-06 Thread Eben
Hi Joerg, Joerg Bruehe wrote: Hi Eben, all ! Eben schrieb: I have the following tables: table1 --- id1 some_field table2 --- id id1 score table3 --- id id1 score I then have the following query: SELECT table1.id,SUM(table2.score) as table2_score FROM table1, table2 WHERE table

Re: trouble with group by and similar tables

2008-06-06 Thread Joerg Bruehe
Hi Eben, all ! Eben schrieb: I have the following tables: table1 --- id1 some_field table2 --- id id1 score table3 --- id id1 score I then have the following query: SELECT table1.id,SUM(table2.score) as table2_score FROM table1, table2 WHERE table1.some_field = 'value' AND table

Re: trouble with group by and similar tables

2008-06-05 Thread ddevaudreuil
Eben <[EMAIL PROTECTED]> wrote on 06/05/2008 02:44:42 PM: > I have the following tables: > > table1 > --- > id1 > some_field > > table2 > --- > id > id1 > score > > table3 > --- > id > id1 > score > > I then have the following query: > SELECT table1.id,SUM(table2.score) as table2_s

Re: trouble with group by and similar tables

2008-06-05 Thread Arthur Fuller
What you need, basically, is to combine two queries, one of which addresses t1 and t2 while the other addresses t1 and t3. Create two views similar to your first query and then join the two views on t1.id and you'll get what you're after. hth, Arthur On Thu, Jun 5, 2008 at 3:44 PM, Eben <[EMAIL