All practice problems Bug of the Day: a new problem every midnight, free for everyone. Keep a streak with your friends.
Data Engineering · SQL · Intermediate
SQL interview question: Trim Everything
How many festival orders came from Delhi? The Delhi total looks suspiciously small.
The problem
- How many festival orders came from Delhi?
You'll use: SQL (SQLite) · SELECT & WHERE · JOIN · GROUP BY · TRIM & datetime() · Data cleaning
Solve it (expert level)3–6 min · You write SQL
Show a hint
Look at the raw city values: SELECT DISTINCT city FROM fest_orders;
What this teaches (spoiler)
Normalise free text (TRIM, UPPER) before grouping or filtering, and validate it on the way in.