分类

链接

2016 年 8 月
1234567
891011121314
15161718192021
22232425262728
293031  

近期文章

热门标签

新人福利,免费薅羊毛

现在位置:    首页 > SQL Server > 正文
共享办公室出租
查询不及格科目大于2学号、学生姓名
SQL Server 暂无评论 阅读(1,304)

select sno,count(0) from student
where score <60
group by sno having count(0)>1

select* from (
select ROW_NUMBER() over( order by score desc) as r , * from student
)t

select * from student where sno in(
select sno from student
where score <60
group by sno,sname having count(0)>1
)
order by sno desc , cno asc

============ 欢迎各位老板打赏~ ===========

本文版权归Bruce's Blog所有,转载引用请完整注明以下信息:
本文作者:Bruce
本文地址:查询不及格科目大于2学号、学生姓名 | Bruce's Blog

发表评论

留言无头像?