M
Matt
I'm trying to run a query that displays a gender count for each job
classification.
ie
(Classification, Male, Female)
HEW1 10 15
HEW2 10 20
TAF1 20 10
with this query:
SELECT alldata.classification,
(SELECT COUNT(*) FROM alldata WHERE gender = "M") AS M ,
(SELECT COUNT(*) FROM alldata WHERE gender = "F") AS F
FROM alldata
group by classification
I can get it to list each classification, but the gender totals are a
count for the WHOLE report not for each individual classification
ie
HEW1 40 35
HEW2 40 35
TAF1 40 35
Is there anyway I can make it so the count query just refers to a
particular classification. I know I could put a where query in there
but then that limits me to just viewing one classification in the
query at a time.
This would be really great if someone could help me solve this because
there's several other reports that follow the same format.
classification.
ie
(Classification, Male, Female)
HEW1 10 15
HEW2 10 20
TAF1 20 10
with this query:
SELECT alldata.classification,
(SELECT COUNT(*) FROM alldata WHERE gender = "M") AS M ,
(SELECT COUNT(*) FROM alldata WHERE gender = "F") AS F
FROM alldata
group by classification
I can get it to list each classification, but the gender totals are a
count for the WHOLE report not for each individual classification
ie
HEW1 40 35
HEW2 40 35
TAF1 40 35
Is there anyway I can make it so the count query just refers to a
particular classification. I know I could put a where query in there
but then that limits me to just viewing one classification in the
query at a time.
This would be really great if someone could help me solve this because
there's several other reports that follow the same format.