Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

Preview

DA 2.16: Auditing the results of a blend

This is the first page of the lesson. Read it and have a go at the activities. The rest is in the full lesson.

55 minutes

The report that did not add up

A blended sales report says 4 rows and 1,250 pence. The till system says 5 rows. Somebody asks: "Which is right?"

An audit answers that. It checks the result against what it should be, and writes down what it found.

Key words

WordWhat it means
Audita planned check of a result against what is needed
Validationchecking values are in a sensible format
Verificationchecking a result is correct, by cross-checking
Control totala count or sum from the source, to compare with
Reconciliationmatching two sets of figures and explaining any gap
Requirementsomething the result must do or show
Audit recorda written note of findings and what to do next

The cells students fill in are left blank in this preview.

By the end of this lesson

Note

I can audit a result and record what I found.

Starter

Have a go

Starter

3 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Your answers are marked here and are not kept. A college account keeps every student’s marks.

Identify the requirements of the audit

Decide what the audit must show. Which result is checked? Against what? Who reads the answer?

Turn that into a short list of checks, each one clear enough to pass or fail.

An audit checklist

CheckTypePass when
Dates are year-month-dayValidationEvery date has the agreed format
No missing amountsValidationNo empty value in pence
Row count equals the sourceVerificationCounts match the control total
Total pence equals the sourceVerificationSums match the control total

The cells students fill in are left blank in this preview.

Validate: is the format right?

Validation checks that the result is in a format that suits the requirements. Dates look like dates. Numbers are numbers. Codes follow the pattern.

It does not prove the figures are right. It proves they are shaped right.

Try it: find the badly formatted date

Code: duckdb
select sale_id, sold_on
from blended
where not regexp_matches(sold_on, '^[0-9]{4}-[0-9]{2}-[0-9]{2}$');

-- Row 3 uses the day first. It fails the check.

Check

Have a go

Check

3 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Your answers are marked here and are not kept. A college account keeps every student’s marks.

The lesson goes on

7 more parts of this lesson are in the full curriculum, with the tasks, the final check and the labs. A college account gives your students all of it.