Skip to course content
Free SQL course

SQL for Data Analysis and AI

Module 10 Activity

Scenario

You are about to send completed revenue to someone who will act on it. Before you do, you are going to prove it - using checks that could actually fail, not checks that restate the query.

Task

Take completed revenue as your figure and run four independent checks:

  1. Parts sum to the whole - do completed and pending orders account for every order and every rupee?
  2. An independent source - does a different table, populated separately, agree?
  3. Magnitude - is the figure the right size for the row count and average?
  4. A check you expect to fail - reconcile order value against line-item value.

Then write the note.

Deliverable

An evidence note of at most five lines: the figure, its population, the checks that passed, the check that failed, and the one limitation a reader must know.

Check your work

completed revenue is ₹0.00. Two tables populated by different processes agreeing to the rupee is the strongest evidence in this dataset - note that there are more payments than orders, because some orders are paid in instalments, so this only works after summing.

the gap being rounding in the average. Consistent.

501 agrees.

Writing the note

A good version reads roughly like this:

> Completed revenue for June 2026 is ₹26,85,905 across 988 completed orders (12 orders remain pending, > worth ₹15,558). Cross-checked against the payments table, which totals the same figure to the rupee. > Limitation: line-item values do not reconcile to order totals for 999 of 1,000 orders, so basket-level > revenue analysis is not supported by this data.

Five lines, every number checked, and the reader knows exactly what they cannot ask this figure to do. That last sentence is what separates an analyst from a query runner.