Count distinct purchased products per customer
SELECT
customer_id
FROM customer
GROUP BY customer_id
HAVING COUNT(DISTINCT product_key) = (
SELECT COUNT(*)
FROM product
)The product table defines the full required set. If a customer has purchased the same number of distinct product keys as the catalog contains, then that customer has bought every product. This is the cleanest and most portable version for this schema.