AnalystPath

Full Product Coverage Customers

SQLMediumMid levelMicrosoft~15 min

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_idcustomer_idproduct_idamount
catalogue
product_idcategoryproduct_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

Related SQL questions