count records in ms access using query

你离开我真会死。 提交于 2021-02-15 07:43:49

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!