Your question is Clean Merchant Transactions for Analysis. Start with the requirements and the three tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
You need to clean inconsistent PSCU transaction records and produce a category-level summary. The dataset includes duplicate loads, inconsistent merchant text, mixed status labels, inactive members, and missing references. Return one row per merchant category with valid posted transaction count, distinct active member count, and total posted amount.
| Column | Type | Description |
|---|---|---|
| member_id | ||
| member_name | ||
| member_status |
| Column | Type | Description |
|---|---|---|
| merchant_id | ||
| merchant_name | ||
| merchant_category |
| Column | Type | Description |
|---|---|---|
| txn_id | ||
| member_id | ||
| merchant_name_raw | ||
| txn_date | ||
| amount | ||
| txn_status | ||
| load_ts |