My solution with explanation
\n1\t\t\tselect customer_id\n2\t\t\tfrom\n3\t\t\t(\n4\t\t\t\tselect customer_id, product_key\n5\t\t\t\tfrom customer\n6\t\t\t\tgroup by customer_id, product_key
```\n1\t\t\tselect customer_id\n2\t\t\tfrom\n3\t\t\t(\n4\t\t\t\tselect customer_id, product_key\n5\t\t\t\tfrom customer\n6\t\t\t\tgroup by customer_id, product_key\n7\t\t\t) as temp\n8\t\t\tgroup by customer_id\n9\t\t\thaving count(*) = \n10\t\t\t(\n11\t\t\t  select count(*)\n12\t\t\t  from product\n13\t\t\t)\n```\n\nIt is not stated in the question whether the customer_id is a primary key of customer table. Therefore, my solution is a bit longer than others, because I consider the situation where we have duplicates, which is a person can buy the same products more than 1 time (results in two or more rows that are exactly the same).\n\nIn order to get rid of the duplicates, I have line 4-6.\n\nFeel free to ask if you have any questions.\n
[]