Practice — Medium · Predict, Then Run
Skills focus. Join kinds as predictions · unpivoting · the discipline of
writing the expected count down first.
Ungraded. The rules of this practice: for every operation, write your predicted row count BEFORE running it. Score yourself out of four at the end.
Part 1 — The join-kind casino
Set up: your appended Sales H1 table (26,139 rows) and the cleaned customer_export table from Lesson 2 (500 customers). You will merge them on CustomerID three times, one join kind each. Before each merge, write down the row count you expect.
- Left Outer. Prediction: ______. Run it. Expand nothing yet — just read the count.
- Inner (as a new merge). Prediction: ______. Consider: how many of the company's ~6,500 active H1 customers can possibly be in a 500-person list?
- Left Anti. Prediction: ______. Hint: parts 1 and 2 already told you.
One more, no running required: what must Inner + Left Anti sum to, and why?
Part 2 — The crosstab
- Import
budget_crosstab_2026.csv. Count its identity columns and its month columns, and predict the unpivoted row count: ______. - Select Region and Category → Unpivot Other Columns. Rename
Attribute→
Month, Value→Target; type Target as decimal. Verify your prediction. - Profile the Month column. How many distinct values should it have? Does it?
Reflection
- Which prediction did you miss, and what belief did the miss correct?
- The predict-then-run habit costs ten seconds per operation. Name the class of error it catches that checking afterward does not — think about what "looks reasonable" means when you had no expectation.