Easy Query using JOINS and GROUP BY
Code\npostgresql []\n-- Write your PostgreSQL query statement below\nselect customer_id from Customer c \njoin Product p on c.product_key = p.product_key\ngroup
# Code\n```postgresql []\n-- Write your PostgreSQL query statement below\nselect customer_id from Customer c \njoin Product p on c.product_key = p.product_key\ngroup by c.customer_id\nhaving count(distinct c.product_key) = (select count(*) from Product)\n```\n![9c6f9412-c860-47d6-9a2e-7fcf37ff3321_1686334926.180891.png](https://assets.leetcode.com/users/images/934e2681-0e03-465b-9507-f78fdb46cd8a_1727526442.9289637.png)\n
['PostgreSQL']