select
from
where
grouo by分组
having分组在筛选
order by排序
select shb ,count(*)
from zx_student
where (xb='nan')
group by shb 按照班级分组
having count(*) > 50 分组进行筛选
order by 2
select *
from zx_student
where xm in (
select xm
from zx_student
group by xm
having count(*) > 1)
order by xm
网友评论