简体   繁体   English

我需要通过非常严格的参数来计算学生人数,我不知道该怎么做

[英]I need to count students by very hard parameter, and idk how to do it

on the inte.net i find only very few info about count in ms access there is query string在 inte.net 上,我发现只有很少的关于 ms access count 的信息有查询字符串

"SELECT students.Student FROM specialty INNER JOIN (groups INNER JOIN
((mark INNER JOIN students ON mark.idstudent = students.IDstudent)
INNER JOIN miss ON students.IDstudent = miss.IDstudent)
ON(groups.IDgroup = students.IDgroup) AND(groups.IDgroup = miss.IDgroup))
ON specialty.IDspecialty = groups.IDspecialty WHERE specialty.Name =
'" + DateFind.otdel + "' GROUP BY students.Student"

what does it - it selects all students with misses, 2, non-admission to lessons.它是做什么的 - 它选择所有未上课的学生,2,不上课。 And i need to count amount of students with that parameters.我需要计算具有该参数的学生数量。

and i tried to do something with counting via adding我试着通过添加来做一些计数

SELECT COUNT(student) FROM students.student WHERE  

and it does nothing.它什么都不做。 Idk how to work with count so help pls, i rly checked on inte.net and there was only simple queries like count by 1 field without any innerjoins and etc.不知道如何使用 count 所以请帮忙,我在 inte.net 上检查了一下,只有简单的查询,比如 count by 1 field 没有任何 innerjoins 等。

If your posted query works, then wrap this as a subquery :如果您发布的查询有效,则将其包装为子查询

"Select Count(*) From (SELECT students.Student FROM specialty INNER JOIN (groups INNER JOIN
((mark INNER JOIN students ON mark.idstudent = students.IDstudent)
INNER JOIN miss ON students.IDstudent = miss.IDstudent)
ON (groups.IDgroup = students.IDgroup) AND (groups.IDgroup = miss.IDgroup))
ON specialty.IDspecialty = groups.IDspecialty WHERE specialty.Name =
'" + DateFind.otdel + "' GROUP BY students.Student) As T"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM