美文网首页
分组和筛选

分组和筛选

作者: 仲伟 | 来源:发表于2017-04-23 13:07 被阅读0次

    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

    相关文章

      网友评论

          本文标题:分组和筛选

          本文链接:https://www.haomeiwen.com/subject/xlfyzttx.html