Interview practice question
Ordered in January but not February
Data Engineering · SQL · Beginner
Find customers who placed an order in January 2026 but not in February 2026.
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Get the set of January customers and February customers.
- Use EXCEPT, NOT EXISTS or a LEFT JOIN anti-join.
- Use date ranges for each month.
- Alternatively aggregate with conditional counts per customer.
- Return distinct customers.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.