當前位置:股票大全官網 - 財經資訊 - 用Mysql單表查詢各班總成績前三名

用Mysql單表查詢各班總成績前三名

select class,total,name from(select *,ywsc+sxsc as total from ST ORDER BY total desc)b

在哪裏

不存在(select * from(select *,ywsc+sxsc as total from ST ORDER BY total desc)c其中c.class=b.class且b.total & ltc .按具有計數的c類分組的總計(*)& gt;2 )

desc b級b級合計訂單