比如说查询学生A上过的每门课有多少人及格,按从大到小排列
select count(b.studentid) from subjectid a left join score b on a.subjectid=b.subjectid left join student c on b.studentid=c.studentid where c.studentname='A' group by a.subjectid having b.score>60 order by count(b.studentid) desc