Your question is SQL Above Average Query. Start with the requirements and the two 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.
Union Bank wants to review approved loan applications whose requested amount is above the average amount across all approved applications. Write a PostgreSQL query using the loan and branch data.
status = 'Approved' when calculating the average and filtering results.| Column | Type | Description |
|---|---|---|
| loan_idPK | INT | Unique loan application identifier |
| customer_id | VARCHAR(20) | Union Bank customer identifier |
| branch_id | INT | Associated branch identifier |
| loan_amount | NUMERIC(12,2) | Requested loan amount |
| status | VARCHAR(20) | Current application status |
| Column | Type | Description |
|---|---|---|
| branch_idPK | INT | Unique branch identifier |
| branch_name | VARCHAR(100) | Union Bank branch name |
| city | VARCHAR(60) | Branch city |