← SQL Operations Cases
Lesson 1 of 4
Count a funnel honestly
Count unique customers rather than repeated visits.
Do the work
- A customer may visit more than once.
- Count distinct customer_id for each stage.
- A count of events is not a count of people.
See the method
Customer 1 visited twice.
Watch the walkthrough
Read the video transcript
- Count a funnel honestly. Customer 1 visited twice.
- Count a funnel honestly. The repeated visit from customer 1 must count once.
- Account for partial refunds. Order 1 refunds are 20 and 10.
- Account for partial refunds. A direct join repeats the sale for each refund. Order 1 net is 90.
- Flag inventory exceptions. PEN 5 < 10 and MUG 0 < 5 are low.
- Flag inventory exceptions. Do not include CARD at equality or BAG with NULL.
- Diagnose duplicate customer keys. Avery and Morgan share team@example.test.
- Diagnose duplicate customer keys. The shared email has two customer IDs. Missing emails are not duplicate keys.
The video works through all four course topics; the lesson demonstrations above focus on the current step.
Practice independently
Exercise 1
Count unique customers by stage
Open practice →Exercise 2Identify visitors without checkout
Open practice →Take it further
A funnel conversion definition must use a consistent cohort; this exercise reports stage counts only.