`
yulon
  • 浏览: 118282 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论
收藏列表
标题 标签 来源
分组排序having union all
select e.program_id,p.pro_name,e.website_id,web.web_name,e.sina_weibo_id as weibo_id,mbl.sina_weibo_id as mbl_weibo_id ,count(*) as event_count,concat('sina') as weibo from event e left join program p on e.program_id=p.program_id left join website web on e.website_id=web.website_id left join member_black_list mbl on e.website_id=mbl.website_id and e.sina_weibo_id=mbl.sina_weibo_id where e.sina_weibo_id!="" and p.status=1001 and p.on_going=1 group by e.program_id,e.website_id,e.sina_weibo_id having event_count>1

union all select e.program_id,p.pro_name,e.website_id,web.web_name,e.tencent_weibo_id as weibo_id,mbl.tencent_weibo_id as mbl_weibo_id ,count(*) as event_count,concat('tencent') as weibo from event e left join program p on e.program_id=p.program_id left join website web on e.website_id=web.website_id left join member_black_list mbl on e.website_id=mbl.website_id and e.tencent_weibo_id=mbl.tencent_weibo_id where e.tencent_weibo_id!="" and p.status=1001 and p.on_going=1 group by e.program_id,e.website_id,e.tencent_weibo_id having event_count>1 order by event_count desc limit 3
Global site tag (gtag.js) - Google Analytics