← SQL Operations Cases

Independent practice · SQLite

Count unique customers by stage

My saved work →

Your work

Active 0:00 · Paused 0s

Show the reference answer
SELECT stage, COUNT(DISTINCT customer_id) AS customers FROM events GROUP BY stage

The repeated visit from customer 1 must count once.