日期:2014-05-17 浏览次数:20749 次
select count(distinct 类型),购买人 from table_name group by 购买人 having count(distinct类型) >= 2
SELECT CONSUMER FROM SHOPPING_RECORD GROUP BY CONSUMER HAVING COUNT(DISTINCT(goods_typ)) > 1;