From event_data, return event_id and JSON_EXTRACT_SCALAR(properties, '$.utm_source') AS utm_source f
A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- medium
Problem
From event_data, return event_id and JSON_EXTRACT_SCALAR(properties, '$.utm_source') AS utm_source for rows where JSON_EXTRACT_SCALAR(properties, '$.utm_source') IS NOT NULL. Order 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.