Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can a query get lots of totals? 1

Status
Not open for further replies.

kupe

Technical User
Sep 23, 2002
376
In the ‘Group’ row in the table are 16 different groups. In the row ‘Division’, each record belongs to one of 10 different divisions.

Can I count how many Group1s are in Division 1-10, and Group2s in 1-10 etc, and then through each of the groups, please?
 
How bout this...

SELECT Group,Division,count(Group) FROM table GROUP BY Division,Group;
 
That looks really interesting, azzazzello. And repeat it 160 times? And yet ... I'll have to think on it and try it. Many thanks.
 
I think I must be seeing things! Can this really do the basic job? I've just tried it in a test db. Looks amazing. I'll try it closer to the real thing and report back. Cheers
 
Azzazzello for King! It works really well adapted into a cross tab query. I'm new to sql, admittedly, but almost every day I am amazed by sql's power. Very grateful for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top