Skip to content

1045. Customers Who Bought All Products 👍

1
2
3
4
5
6
SELECT customer_id
FROM Customer
GROUP BY 1
HAVING COUNT(DISTINCT product_key) = (
    SELECT COUNT(*) FROM Product
  );