当前位置:网站首页>MySQL 查询出重复出现两次以上的数据 - having

MySQL 查询出重复出现两次以上的数据 - having

2022-08-10 18:16:00 多汁多味

#  查询出 zxtId 重复出现两次以上的数据

select *  from wx_material where 1=1 group by zxtId having count(zxtId) > 2

 

 

 

#  查询出 zxtId + billUuid 重复出现两次以上的数据

select *  from wx_material  where 1=1 group by zxtId,billUuid  having count(zxtId + billUuid) > 2

 

原网站

版权声明
本文为[多汁多味]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_43652507/article/details/126265348