Customers Missing From the Activity Report
SQL · data quality · Beginner · about 15 minutes
Impact
Customer success reports that the order-activity report lists fewer customers than the CRM after a query refactor.
Symptoms
- The report ran without errors.
- The CRM has 4 customers; the report shows 3.
- The missing customer has never placed an order.
- The previous version of the report listed every customer.
Evidence
Row counts
| dataset | rows |
|---|---|
| Customer | 4 |
| Orders | 5 |
| order-activity report (this run) | 3 |
| order-activity report (previous run) | 4 |
Report output, this run
| customer_id | customer_name | city | order_count |
|---|---|---|---|
| 1 | Krishna | Hyderabad | 2 |
| 2 | Sudheer | Bangalore | 1 |
| 4 | Rahul | Hyderabad | 2 |
Report job log
report_order_activity deploy: query refactor (join simplified) report_order_activity rows=3 previous_rows=4 status=SUCCESS
Investigation task
Produce the order-activity report for every customer, showing 0 for customers with no orders: customer_id, customer_name, city, order_count, ordered by customer_id.
The fix is written and graded in the regular challenge editor. The postmortem unlocks once the incident is resolved.