/*表scores有四个字段,学生stu、班级class、学院institute、分数score。 
要求返回:班级考试人数大于10、班级最低分在50分以上、计算机学院、班级平均分从高到低前10名。
可以用任意数据库写SQL 返回字段为班级,平均分。
*/

--不准嵌套语句。
select top 10 class,平均分=avg(score) from tb 
where  institute='计算机学院' 
group by class   
having count(1)>=10 and min(score)>=50 
order by avg(score) desc



相关文章:

  • 2022-12-23
  • 2021-10-23
  • 2022-12-23
  • 2021-12-04
  • 2021-12-10
  • 2021-12-18
  • 2021-11-20
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-14
  • 2022-12-23
相关资源
相似解决方案