← SQL Operations Cases My saved work →
Independent practice · SQLite
Identify visitors without checkout
Practice dataset
Your work
Active 0:00 · Paused 0sKeep a handoff you can replay
Check your current answer, then download the output and its report. The report includes the source, answer and each check so you can review what passed and what needs work.
To replay your work, open this task with the same dataset, import your answer and check it again.
Show the reference answer
SELECT DISTINCT e.customer_id FROM events e WHERE e.stage='visit' AND NOT EXISTS(SELECT 1 FROM events c WHERE c.customer_id=e.customer_id AND c.stage='checkout')
Customers 2 and 4 visited but have no checkout event.