Easy to understand solution- No cartesian join needed
Select customer_id from (select distinct \n                         customer_id,product_key from customer) g group by customer_id\nhaving count(*) = (select cou
Select customer_id from (select distinct \n                         customer_id,product_key from customer) g group by customer_id\nhaving count(*) = (select count( product_key) from product)\n\n1- Use the inner query to get rid of dups ( one customer purchasing same product more than once)\n2- Then get the number of times each customerid appears in the customer table.\n3- The records with the count equal to number of products should be in our answer.
[]