MS Access count query

Joined
Apr 7, 2009
Messages
1
Reaction score
0
Please Can You Help With This!

I am trying to create a query in ms access which is a union.
The query counts how many applicants come from each town. However when I run the query it shows how many applicants come from each town in one row however you cannot tell which towns the applicants come from, all you get is a list of numbers.

Here is the query:

SELECT Count(tblApplicant.Town) AS No_Of_Applicants
FROM tblApplicant
WHERE (((tblApplicant.Town)='Buckinghamshire'));
UNION ALL
SELECT Count(tblApplicant.Town) AS No_Of_Applicants
FROM tblApplicant
WHERE (((tblApplicant.Town)='Essex'));
UNION ALL
SELECT Count(tblApplicant.Town) AS No_Of_Applicants
FROM tblApplicant
WHERE (((tblApplicant.Town)='Hertfordshire'));

Is there any way that I can get the number of applicants under the headings of the towns.
Please help
Thanks in advance.
 
Joined
Jun 13, 2011
Messages
2
Reaction score
0
Can't someone help me? I'm stuck in Access
I have one table and one query;
TABLE_A
RiskRatingID RiskRatingDesc
1 Low
2 Medium
3 High
4 Extreme


QUERY_A
RiskLevel
Medium
Medium
High
Medium
Medium
Medium

How do I query so the result would be like this:

RISKLEVEL TOTAL
Low 0
Medium 5
High 1
Extreme 0
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top