select
from
where
grouo by分組
having分組在篩選
order by排序
select shb ,count(*)
from zx_student
where (xb='nan')
group by shb 按照班級分組
having count(*) > 50 分組進(jìn)行篩選
order by 2
select *
from zx_student
where xm in (
select xm
from zx_student
group by xm
having count(*) > 1)
order by xm