Back to problems

Write SQL for DAU and first-purchase conversion

SQL · Netflix · Medium

Given three tables — users (user_id, signup_date), events (user_id, event_date, event_type), and orders (order_id, user_id, order_date, amount) — write one SQL query that reports a row for each of the seven calendar days from 2025-04-14 through 2025-04-20, with 2025-04-20 treated as the current date. Every row must carry four columns: day (a DATE), dau (how many distinct users have at least one events row whose event_type is 'session' on that day), new_buyers (how many users…

Checking your access…