The event_data table has a JSON payload column
A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- medium
Problem
The event_data table has a JSON payload column. For purchase events (event_type = 'purchase'), the payload holds a numeric amount. Return event_id and the amount extracted from the payload, ordered by event_id.
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and grades it automatically.