Data Analyst

Case File: Totals by City

The board asks for numbers by city, and the answer is never a list of rows: it is a total, a count or a rate for each group. In a real SQLite database in this page, answer four questions as views with GROUP BY: parcels and revenue per city, the busy cities (HAVING, not WHERE), the percentage of late parcels per city as a ratio of sums, and how many different customers each city has (COUNT DISTINCT). The database is generated for you alone.

50 min

Case File: Totals by City

The board asks for numbers by city, and the answer is never a list of rows: it is a total, a count or a rate for each group. In a real SQLite database in this page, answer four questions as views with GROUP BY: parcels and revenue per city, the busy cities (HAVING, not WHERE), the percentage of late parcels per city as a ratio of sums, and how many different customers each city has (COUNT DISTINCT). The database is generated for you alone.

In this lesson:

  • sql
  • sqlite
  • group by
  • having
  • aggregate
  • count distinct
  • rate
  • 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