MS SQL Solution. Beats 88.85%. Group by + having
Code\n\n/* Write your T-SQL query statement below */\nselect customer_id from Customer\ngroup by customer_id\nhaving count(distinct product_key) = (select count
# Code\n```\n/* Write your T-SQL query statement below */\nselect customer_id from Customer\ngroup by customer_id\nhaving count(distinct product_key) = (select count(product_key) from Product)\n```\n\n![telegram-cloud-photo-size-2-5260650294499465606-y.jpg](https://assets.leetcode.com/users/images/51bffdf2-96a1-49ca-9a3b-93d2488ad8e3_1721744911.876846.jpeg)\n\n
['MS SQL Server']