leetcode 1045 买下所有产品的客户
leetcode 1045 买下所有产品的客户
select customer_id from Customer c left join Product p on c.product_key = p.product_key group by customer_id having count(distinct c.product_key) = (select count(*) from Product)
select customer_id from ( select distinct customer_id, product_key from customer ) t group by customer_id having count(*) = ( select count(product_key) from product )
==

浙公网安备 33010602011771号