Full Product Coverage Customers
Problem
**[Asked at Microsoft Azure]**
A **premium customer** is one who has purchased at least **one product from every
available product category** in the catalogue.
Find the IDs of all premium customers, ordered ascending.
Tables
Example rows — the live problem includes the full dataset.
contracts
| contract_id | customer_id | product_id | amount |
|---|
catalogue
| product_id | category | product_name |
|---|
Expected output
Your answer should return 2 rows with the columns customer_id.
Starter code (SQL)
SELECT *
FROM contracts;Solve this SQL question free
Write SQL and run it instantly in your browser — even on your phone. No signup needed to try.
Solution & explanation
Create a free account to unlock the optimal solution, a step-by-step explanation, and the hidden test cases that grade your answer.
Sign up free to unlock