SELECT COUNT(uuid) FROM ( SELECT uuid,SUM(page_a_cnt) AS sum_a,SUM(page_b_cnt) AS sum_b FROM ( SELECT uuid,IF(pageId=pageA,1,0) AS page_a_cnt,IF(pageId=pageB,1,0) AS page_b_cnt FROM tb WHERE pageId=pageA OR pageId=pageB ) t1 GROUP BY uuid ) t2 WHERE t2.sum_a>0 AND sum_b>0
1 3

相关推荐

joe2333:怀念以前大家拿华为当保底的日子
点赞 评论 收藏
分享
牛客网
牛客企业服务