DataCareerHub
Explore learning
Lesson 3 of 8 · 60 min

Build a reproducible analysis with explicit checks

Learn the reasoning. Try the task. Compare your answer.

Prepared for DataCareerHub · Curriculum version 2026-10-15.6

By the end of this lesson

  • Calculate consistent monthly and channel measures.
  • Connect a spreadsheet or SQL calculation to its source population.
  • Compare query outputs, columns and units with the supplied expectations.

Fictional guided portfolio · Source from Module 4 · Local spreadsheet or SQLite · Open the worked case study ↗

Understand the method

The analysis should allow another reader to reproduce the numbers without relying on a screenshot. Choose a primary tool and make the calculation sequence visible. Both the spreadsheet and SQL routes start from the verified order grain and the same completed-status rule. A tool change must not silently change units, inclusion rules or the denominator of an average.

Define the calculation contract

Completed-order value sums order_value_eur for eligible completed orders. Completed count counts those orders. AOV divides that value by that count. Delivery coverage divides measured completed orders by all eligible completed orders; the observed delivery mean uses only measured durations. Status-share calculations belong to a separately stated population. A returned order’s recorded value is not a refund transaction or proof of a customer-cohort return rate.

Follow the SQL route

Run analysis_setup.sql in a new empty local SQLite database, then work through analysis_starters.sql. P1/P2 inspect the source, P3 produces monthly completed metrics and delivery coverage, P4 produces channel metrics and order shares, P5 compares explicit status-share denominators, P6 calculates a prior-observed-month comparison, P7 builds distribution bins and P8 separates baseline from an outlier-exclusion scenario. Compare your answers with analysis_solutions.sql only after trying the tasks.

Use P3 as the baseline and reconcile P4’s counts and values back to each month. Query P6 uses LAG, so its prior value is the previous observed row. It is a true April–May comparison in this fixture because both months are present; on a different source with gaps it would need a calendar-completeness check. The first prior value remains NULL, and a zero prior denominator also produces an unavailable percentage.

Follow the spreadsheet route

Import the prepared data with IDs as text, valid date values and numeric EUR amounts. Keep delivery blanks empty. Use the monthly conditional sums and counts practised in Module 2, then divide totals by eligible counts for AOV. Build a month/channel summary from the same data. Keep inputs separate from summaries, label cells and show calculations rather than typing the answer-key totals into a dashboard.

After filtering, be careful about totals that still include hidden records. Use an explicitly defined conditional calculation or a correctly configured summary rather than assuming a visible filter changes every formula. Recreate coverage with a measured-value count that preserves a known zero and excludes a missing value. Use the expected output file as a comparison after calculation, not as a substitute data source.

Record independent checks

April should have 20 completed orders and €2,900; May has 20 and €3,420. Channel values and counts should reconcile to these baselines. Across the full completed population, total value is €6,320 and AOV is €158. A zero reconciliation difference is useful only when both sides are independently derived rather than linked to the same already-aggregated cell.

Keep query names or worksheet references beside each reported measure. Record the engine or tool used and any untested features. The downloadable expected_outputs.json records query columns and rows; shares are fractions, while change_pct is in percentage units. This attention to definitions makes comparisons meaningful across tools.

Your turn

Practical exercise

Complete P3–P6 in SQLite or build equivalent spreadsheet summaries. Produce monthly value/count/AOV, delivery measured/missing/coverage, channel metrics with order shares and the May-versus-April value comparison. Reconcile both monthly counts and values, then name the two returned-share denominators in P5.

Deliverable: an editable query script or calculation workbook, a short metric contract and a verification table. Record expected/observed values and explain how NULL, blanks and numeric zeros are represented in your tool.

Open the worked solution
MeasureAprilMay
Completed count2020
Completed value EUR29003420
AOV EUR145171
Measured / eligible14 / 2019 / 20
Delivery coverage70%95%
Observed mean days51/14 = 3.642967/19 = 3.5263
Returned / all statuses1/22 = 4.55%1/22 = 4.55%

P4 produces April store: 2 orders, €1,100, AOV €550, share 10%; April web: 18, €1,800, €100, 90%; May store: 18, €3,240, €180, 90%; May web: 2, €180, €90, 10%. These components reconcile exactly to P3. The alternative returned/(completed+returned) share is 1/21 = 4.76%, not the same as 1/22.

P6 retains April’s prior value and change as NULL. May change is (3420−2900)/2900 × 100 = 17.9310%. SQLite coverage/share outputs such as 0.7 mean 70%; change_pct is already 17.9310, not 0.179310. The complete expected columns and rows are in the supplied JSON file.

Check your understanding

One more question.

Why should channel totals be reconciled to independently calculated monthly totals?

Practice feedback only. This check is not a graded assessment and is not saved.

How these learning materials are prepared and maintained · Report a correction: support@datacareerhub.io

Read and practice without an account. Sign in with an existing account to save lesson completion.

Next lesson →

Fictional training data. Portfolio practice is not a claim of client work or an accredited qualification. Explore practical lessons, worked examples and projects. Follow a published path, practise the method and build work you can explain.