
Inspect the retail dataset and identify what one row means in each table.
Trace customer keys to orders and explain which rows an inner join returns.
Predict the number of customer-order pairs and test the prediction against the data.
Compare ON and WHERE filters and count qualifying orders while retaining every customer.
Find inactive customers and unassigned orders, including the NULL trap in NOT IN.
Classify matched, order-only and dispatch-only records and rewrite a right join as a left join.
Trace an order through independent line and payment matches and explain the inflated totals.
Summarize lines and payments separately, then combine them at one row per order.
Deliver billed, collected and outstanding amounts for every order and reconcile them to source totals.
A retail order contains two items and two payments. Join those tables directly and the query runs successfully. The dashboard even looks plausible. Yet the billed amount has doubled. In this short course, you will follow the individual rows, explain what happened, and build a report that agrees with the source data.
Start with a small retail database that you can inspect by eye. Identify the grain of each table, match orders to customers, and predict how many rows a one-to-many relationship will produce. Then switch perspectives. The marketing team needs every customer, including people who have never placed an order. The warehouse needs to know which dispatch references are missing from the order system. You will choose a join for each question and check the answer against identifiable records.
In the final project, you will calculate billed, collected, and outstanding amounts for every order. You will compare two ways of combining line items and payments, then validate both row counts and monetary totals independently. Download the practice database, setup script, exercises, and worked SQL solutions to repeat the investigation at your own pace.
This course is designed for analysts, BI developers, and SQL beginners who already know how to write a simple SELECT query. The examples fit on screen, so you can follow each transformation before running it yourself. AI tools assisted in preparing the course illustrations, slides, narration drafts, and practice materials.