DataCareerHub
Explore learning
← Career & résumé studioFree companion · 35 minute suggested activity

Job simulation 1: agree what revenue means

Harbor Desk, a fictional office-supply shop, asks why January sales differ between dashboards. Clarify the question before you write SQL.

Learn → Try → ExplainReviewed 2026-11-01
01

Your stakeholder brief

The operations manager says: “January revenue is 410 on one dashboard and 375 on another. Which is correct?” You have six orders and four refund events. Amounts are fictional whole EUR, excluding tax and shipping. The exercise is deliberately small enough to check by hand. This is a teaching metric, not a financial reporting policy.

02

Make the contract explicit

Use completed orders placed during January, with start inclusive and February 1 exclusive. Define gross as completed order amount. Define January net order value as gross less refunds on those orders recorded before February 1. A later refund belongs to a later as-of view; do not silently change the cutoff. Cancelled orders contribute neither revenue nor the completed-order denominator.

03

Inspect the actual source

Paste this fixture into a fresh local SQLite database. Do not run CREATE TABLE against an existing work database. No download or third-party account is required. Read the rows even if you cannot run SQLite.

CREATE TABLE orders(order_id TEXT PRIMARY KEY,customer TEXT,ordered_at TEXT,status TEXT,amount INTEGER);
CREATE TABLE refunds(refund_id TEXT PRIMARY KEY,order_id TEXT,refunded_at TEXT,amount INTEGER);
INSERT INTO orders VALUES
('o1','A','2026-01-01','completed',100),
('o2','A','2026-01-02','completed',60),
('o3','B','2026-01-03','completed',80),
('o4','B','2026-01-04','cancelled',40),
('o5','C','2026-01-05','completed',120),
('o6','C','2026-01-06','completed',50);
INSERT INTO refunds VALUES
('r1','o2','2026-01-10',10),
('r2','o2','2026-01-11',5),
('r3','o5','2026-01-12',20),
('r4','o1','2026-02-02',25);
04

Try before checking

Write a six-line metric contract: business question, one-row grain, status rule, date window, refund cutoff and denominator. Name the timezone/export assumptions you would ask about in real work. Predict both totals, count completed orders, and explain why a refunded order is still an order.

Worked solution and controls

Completed orders: o1, o2, o3, o5, o6; count 5, distinct customers 3. Gross: 100+60+80+120+50=410. Included refunds: 10+5+20=35. Net: 375; net per completed order: 75. The February refund of 25 is excluded by the stated cutoff. Customer net totals A=145, B=80, C=150. Both dashboards can be arithmetically correct while answering different questions. Label gross/net and as-of time.

06

Interview checkpoint

Answer in 90 seconds: “I would not choose a dashboard before agreeing the metric. Here the 35 difference is explained by included refunds. I checked order grain, statuses and cutoff, then reconciled 410 minus 35 to 375.” State that this is a fictional training case when describing it in a portfolio. Continue with Job simulation 2 in this career studio.

Make the reasoning yours.

Try the activity before reading its reference. Keep your sources, commands and assumptions with your work. Companion activities are unsaved self-practice and do not award a certificate or change lesson progress.

Resume guidance and examples are for learning and preparation only. They do not guarantee interviews, a job offer or employment.

These original companion activities are free. Advanced offline packs are separate supporter extras; companion activities do not change saved course progress.

Learner dashboard ↗ · Ask a question ↗