QUESTION POSED ON: 11 January 2008
I have an Orders table with persons and toys. Sample values are:
person toy
1 puzzle
1 puzzle
1 doll
1 game
2 puzzle
2 doll
3 doll
3 game
3 game
4 doll
4 game
5 doll
5 doll
Persons may have several toys with the same or different names.
I'm only interested in persons with games or puzzles.
The query results I want from the above table are:
toycount personcount
3 1
2 1
1 2
In English I'd say: Show me a descending count of the number of toys ordered
(puzzles and games only) and the number of people who ordered that many.
It seems like this should be easy, but I'm just not getting it! Thanks
for any help.
|