plsql数据库里 select from where group by having order by

2024-12-16 02:54:15
推荐回答(1个)
回答1:

比如说查询学生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