Case File: The Above-Average Customers
Four questions need a query inside a query: parcels above the average revenue, customers who never had a late parcel, customers who are not on the blocked list, and the best customer in each city. In a real SQLite database in this page, answer them with subqueries, NOT EXISTS and a common table expression, and discover why NOT IN returns nothing at all when the list contains a NULL. The database is generated for you alone.
Case File: The Above-Average Customers
Four questions need a query inside a query: parcels above the average revenue, customers who never had a late parcel, customers who are not on the blocked list, and the best customer in each city. In a real SQLite database in this page, answer them with subqueries, NOT EXISTS and a common table expression, and discover why NOT IN returns nothing at all when the list contains a NULL. The database is generated for you alone.
In this lesson:
- sql
- sqlite
- subquery
- cte
- not exists
- not in null
- row_number
- case-file
This lesson is part of a paid plan
Upgrade to Pro to unlock this course, its labs and its exam.
View Pricing Plans