sqlquery4.sql
来自「经典的SOL面试题,涵盖了数据库各个层面的问题和答案。」· SQL 代码 · 共 30 行
SQL
30 行
/*
use test
go
create table score (fid int identity(1,1),fclass int, fsscore int)
*/
select b.fclass,max(b.fsscore) from
(
select * from score
where fclass in (select fclass from score group by fclass having count(*)>30)
) b
group by b.fclass
select * from score
select max(fid) afid,max(fsscore) afsscore,fclass from score where fclass in(
select fclass from score group by fclass having count(*)>30)
group by fclass
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?