1、题目描述
来源:力扣(LeetCode)
2、解题思路
1# 首先对Customer
去重,select distinct * from customer
2# 然后,统计每个客人购买的货物种类数量select customer_id,count(product_key) cou1
3# 增加子表,对Product
统计所有货物种类select count(*) as cou2 from Product
4# 对比两个量
3、提交记录
select customer_id
from
(select customer_id,count(product_key) cou1
from (select distinct * from customer)a3
group by customer_id) a,
(select count(*) as cou2
from Product)b
where a.cou1=b.cou2