A Combined Activity Timeline

medium
Checkpoint challenge
Solve this to show you know the material and jump straight to Unit 20. Everything before it counts as cleared.

Build one timeline of signups and orders. Return event_date, customer_id, event ('signup' or 'order') and amount (NULL for signups, the order total for orders).

Sort by event_date, then with signups before orders on the same date, then by customer_id.

Schema

customers(id, name, country, signup_date)
orders(id, customer_id, order_date, total)
#union#events1 visible + 1 hidden tests
query.sql · SQLite
Loading editor…
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
A Combined Activity Timeline · TechGradify