`
ktc7000
  • 浏览: 33008 次
  • 性别: Icon_minigender_1
  • 来自: 南京
社区版块
存档分类
最新评论

有用的SQL语句

阅读更多
--tab表中字段A为准分组,字段B下有不同值的数据统计
select t.A,count(distinct B) from tab t group by t.A having count(distinct B)>1;

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics