如题:
统计所有购入商品为两种或两种以上的购物人记录SQL
如下表: comc
SQL:
比较简略,仅供参考,欢迎指点
SELECT * FROM comc WHERE b IN ( SELECT b FROM comc GROUP BY b HAVING count( * ) >= 2 )
如题:
统计所有购入商品为两种或两种以上的购物人记录SQL
如下表: comc
SQL:
比较简略,仅供参考,欢迎指点
SELECT * FROM comc WHERE b IN ( SELECT b FROM comc GROUP BY b HAVING count( * ) >= 2 )