All practice problems Bug of the Day: a new problem every midnight, free for everyone. Keep a streak with your friends.
Data Engineering · SQL · Hard
SQL interview question: The Rating Gap
How many of Bandra's orders have actually been rated? 100% of customers left a rating? Sure.
The problem
- How many of Bandra's orders have actually been rated?
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 stars column. Some are NULL.
What this teaches (spoiler)
NULL means unknown. COUNT(column) and AVG ignore NULLs; COUNT(*) doesn't. Choose on purpose.