表web_order  列 name ,businesscode, a.account

周桥 18929609222 3754031157710000
妙药 18929609233 3754031157712344
灵丹 18929609189 3754031157710000
周桥 13329609189 3754031157713333

查出一个表中account 出现次数大于2的所有记录

select a.name ,a.businesscode, a.account
from web_order a,
     (select b.account,count(b.account) as count
      from web_order b
      group by b.account
      having count(b.account)>300
      ) c
where a.account=c.account

 

不重复显示

name,bsinesscode,account 并加一列count(account)
select min(a.name) ,min(a.businesscode),a.account, count(a.account)
from web_order a where 1=1
group by a.account
having count( a.account)>=100

相关文章:

  • 2021-09-01
  • 2021-06-01
  • 2022-12-23
  • 2021-08-04
  • 2021-12-30
  • 2022-12-23
  • 2021-12-10
猜你喜欢
  • 2022-12-23
  • 2021-10-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-20
相关资源
相似解决方案