Data Analyst

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.

60 min

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

This lesson is part of the Pro plan. Upgrade to unlock the full lesson, the labs and the exam.

Upgrade Now

This lesson is part of a paid plan

Upgrade to Pro to unlock this course, its labs and its exam.

View Pricing Plans