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: Too Many Rows
What was the total value (in paise) of all orders placed at Connaught Place? The store sold more than the city. Impossible.
The problem
- What was the total value (in paise) of all orders placed at Connaught Place?
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
How many rows does one order have after joining items?
What this teaches (spoiler)
Know the grain of each table. Joining to a one-to-many table multiplies rows: aggregate before you join.