MYSQL : HAVING COUNT(DISTINCT) + GROUP BY.  Good Luck 👍✨
\n# Write your MySQL query statement below\n\n/**\nTwo Tables: Customer/Product\n\nThere is no primary key for Customer table. It may contain duplicates.\nprodu
```\n# Write your MySQL query statement below\n\n/**\nTwo Tables: Customer/Product\n\nThere is no primary key for Customer table. It may contain duplicates.\nproduct_key is a foreign key to Product table.\n\nproduct_key is the primary key column for Product table.\n\nPROBLEM:  report the customer ids from the Customer table that bought all the products in the Product table.\n\nSTEPS\n    HAVING COUNT(DISTINCT product_key) = (SELECT COUNT(*) FROM Product)\n\n*/\n\nSELECT\n    customer_id\nFROM Customer\nGROUP BY customer_id\nHAVING COUNT(DISTINCT product_key) = (SELECT COUNT(*) FROM Product)\n```
['MySQL']