Your question is Handle Missing Financial Input Values. 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.
Write a PostgreSQL query for Qlik planning data that handles missing amount values for January 2024. Return each plan record with its account and manager, keep the original amount when present, otherwise fill from the account default, and fall back to 0 if both are missing. Also label each row with the fill method used.
| Column | Type | Description |
|---|---|---|
| record_id | ||
| account_id | ||
| manager_id | ||
| plan_month | ||
| amount |
| Column | Type | Description |
|---|---|---|
| account_id | ||
| account_name | ||
| default_amount |
| Column | Type | Description |
|---|---|---|
| manager_id | ||
| manager_name |