FROM ANSWER TO CONVERSATION01 — 03
01 / THE TASK
Find the repeat customers.
Write a query using customers and orders.
SELECT customer_id
FROM orders
GROUP BY customer_id
HAVING COUNT(*) > 1
FROM orders
GROUP BY customer_id
HAVING COUNT(*) > 1
02 / THE ANSWER
Notice the assumption.
The query counts every order, including cancelled ones.
What counts as a purchase?
03 / THE INTERVIEW
Ask a better question.
“How would you change this if cancelled orders shouldn’t count?”
Explore the reasoning.
Let the candidate explain.
Let the candidate explain.
Featured story
Your next interview should start with the work.
Two candidates can reach the same score for very different reasons. A focused task gives your team something concrete to explore in the interview.
Read the story