Group by clause on 3 tables

From: Jack (jack.witte_at_comcast.net)
Date: 07/31/04


Date: Sat, 31 Jul 2004 19:42:02 GMT

I have 3 tables: Teams(TID,...)
                            Players(TID,PID,...)(1:M with Teams)
 and Games(TID,GID,....)(1:M with Teams)
I am trying to write a group by query on teams and get the number of players
and number of games each team has.
If I write the group by just for each tabell by itself I get the correct
count(14 for players and 10 for games).
If the query contains all three tables linked by TID, I get the count for
games ok(10) but the count for players is (10), the same as the count for
games.
I cant figure out what I have done wrong.

In the query I have Group by clause on TeamID and the count on PID and count
on GID
Thanks for any help



Relevant Pages

  • Re: Group by clause on 3 tables
    ... "Jack" wrote in message ... > count(14 for players and 10 for games). ... > If the query contains all three tables linked by TID, ...
    (microsoft.public.access.queries)
  • RE: export subform data to a text box or to a file
    ... subform with the list of the games, display the correct games, sorted by ... pontuation(pontuation filed is not on my query). ... how to do a command button to export this data on my subform ...
    (microsoft.public.access.formscoding)
  • Re: Query too complex
    ... Finds all Games played in November from table ... Avg of for visitors ... It is query 7 where the "Query too complex" error occurs. ... >> David McKnight ...
    (microsoft.public.access.queries)
  • sql-help
    ... How can i query the customers who both have ordered Games and hardware??? ... SELECT tCustomers.* ...
    (microsoft.public.vb.database)
  • sql-help
    ... How can i query the customers who both have ordered Games and hardware??? ... SELECT tCustomers.* ...
    (microsoft.public.vb.database.ado)