面試-一道經典的sql語句題
阿新 • • 發佈:2019-02-08
原文地址:http://blog.csdn.net/xiaoyida11/article/details/22441617
給一個班級成績表 student (name,subject,score) ,
查詢出所有總分數>600分的學員
- selectname,sum(score) from student groupbynamehavingsum(score)>600;
-
select
找出有三科掛了的學員
[sql] view plain copy print?
- selectnamefrom student where score<60 groupbynamehavingcount(name)>=3;