Skip to course content
Free SQL course

SQL for Data Analysis and AI

Unit 01.04: Writing the evidence note

Unit ID: SQL-M01-U05 - Estimated active time: 12-15 minutes Objective: produce a short, reviewable note that lets someone else trust or challenge your number.

A number without a note is not evidence

"Revenue was ₹26.9L last month" is a claim. It becomes evidence when a reader can check it. A good note is short - five lines - and answers the questions a reviewer would ask.

The five-line format

The five lines of an evidence note and the question each one answers An evidence note has five lines. Question states what was asked: what was total revenue in June 2026. Source states where the number came from: the orders table, filtered to placed_at on or after 2026-06-01 and before 2026-07-01, with status completed. Grain states what one row represents: one order, verified as 1,000 rows in and 988 completed rows out. Result states the number: 26,85,905 rupees across 988 completed orders. Limitation states what the number excludes: 12 orders still pending, and refunds not deducted. The limitation line is the one people skip and the one reviewers value most. Five lines a reader can check without asking you anything QUESTION What was total revenue in June 2026? What exactly was asked? SOURCE orders, placed_at ≥ 2026-06-01 and < 2026-07-01, status = 'completed' Where did it come from, so it can be re-run? GRAIN one row per order — 1,000 rows in, 988 completed rows out What does one row, and therefore the count, represent? RESULT ₹26,85,905 across 988 completed orders The number, carrying its population with it. LIMITATION excludes 12 orders still pending; refunds not deducted What must this number not be used for? The limitation line is the one people skip and the one reviewers value most.
Each line answers a question a reviewer would otherwise have to ask you.
Question:   What was total revenue in June 2026?
Source:     orders table, placed_at >= 2026-06-01 and < 2026-07-01, status = 'completed'
Grain:      one row per order (verified: 1,000 rows in, 988 completed rows out)
Result:     ₹26,85,905 across 988 completed orders
Limitation: excludes 12 orders still in 'pending'; refunds not deducted

The limitation line is the one people skip and the one reviewers value most.

Worked example

SELECT
  COUNT(*)            AS orders,
  SUM(order_total)    AS revenue
FROM orders
WHERE placed_at >= '2026-06-01'
  AND placed_at <  '2026-07-01'
  AND status = 'completed';

Note the >= / < date pattern rather than BETWEEN. BETWEEN '2026-06-01' AND '2026-06-30' silently drops orders placed on the 30th after midnight if placed_at is a timestamp. That is exactly the kind of detail the evidence note exists to surface.

Practice

Take any query you wrote in this module and produce its five-line note. Then hand it to someone and ask them to find one thing they cannot verify from the note alone. Add that thing.

Takeaway

Finish every analysis by writing what you checked and what you could not. The habit costs two minutes and is the difference between an analyst people trust and one they double-check.

---

Module 01 Knowledge Check

Ten questions. Pass mark 8/10. Retry after reviewing feedback.

1. orders has 1,000 rows and order_items has 3,400. After orders JOIN order_items ON order_id, how many rows?

*The join lifts the result to the order-item grain - one row per item.*

2. What does "grain" mean?

3. SELECT COUNT(*) FROM tests; returns 10 and SELECT COUNT(score) FROM tests; returns 8. Why?

*Aggregates skip NULL. COUNT(*) counts rows; COUNT(col) counts non-null values.*

4. WHERE country <> 'IN' - which rows are excluded that a reader might not expect?

5. Which fixes join fan-out while keeping item counts?

6. A manager asks for "average order value". You have order_items with a price column. AVG(price) gives you…

7. orphan_orders returns 47 from a LEFT JOIN null-check. What does that mean?

8. Why prefer placed_at >= '2026-06-01' AND placed_at < '2026-07-01' over BETWEEN?

9. Which relationship shape leaves the row count unchanged when joined?

10. Which belongs in an evidence note but is most often omitted?

Applied checkpoint

Using any database you can access (or the sample schema above), produce:

  1. A grain statement for two related tables.
  2. A row-count check before and after joining them.
  3. One query whose result changes depending on how you treat NULL, with both versions and a one-line

justification for the version you would report.

  1. A five-line evidence note for that result.

Meets standard when: the grain statements are specific, the row-count check is present, the NULL decision is justified rather than assumed, and the note names at least one real limitation.