query getting totals/percentages

  • Thread starter Thread starter DT
  • Start date Start date

DT

Registered User.
Local time
Yesterday, 19:22
Joined
Oct 23, 2000
Messages
83
I've been asked to get some percentages of how many of each CardVal by Dept. The query looks like this:
CardID CardVal Dept
1 F 21
2 F 21
3 U 21
4 IP 21
5 F 21
6 U 21

Is there a way to get the totals broken up by value:
F=3
U=2
IP=1

I also have another crosstab query that reads left to right.
21 F F U IP F U

I'm not sure how to approach this.

Thanks
 
You have to use a GroupBy in your Query to get you the result.. After extarcting the data, just add this GROUP BY CardVal.. something like..
Code:
SELECT CardVal, Count(CardVal) AS CountOfCardVal
FROM [I][B]TableName[/B][/I]
GROUP BY CardVal;
 

Users who are viewing this thread

Back
Top Bottom