问题
how to count record in ms access? here are my tables
[basicinfo](table1)
[Name age rawscore](fields)
mark 16 6
paul 17 5
bryan 16 8
jenny 16 7
verbal(table2)
[rawscore scaledscore](fields)
1 1
2 1
3 2
4 2
5 3
6 3
7 4
8 4
9 5
10 5
writen(table3)
[rawscore scaledscore]fields
1 1
2 1
3 2
4 2
5 3
6 3
7 4
8 4
9 5
10 5
basically i want to count how many examinee has a scaled score of 1,2,3,4,5 both for table 2 and 3
回答1:
Try the following query. It will list each scaled score and a count of students even if the count is 0. Change "FROM verbal" to "FROM written" for the written table.
SELECT v.scaledscore as [Scaled Score], count(i.rawscore) as [Count]
FROM verbal v LEFT JOIN basicinfo i ON v.rawscore = i.rawscore
GROUP BY v.scaledscore
来源:https://stackoverflow.com/questions/7733994/count-records-in-ms-access-using-query