Write SQL to join customer and loan tables and calculate the total loan amount per customer.
Return one row for every customer, including customers with no loans. Treat customers with no non-null loan amounts as having a total of zero.
customer_id, customer_name, and total_loan_amountcustomer_id ascending| Column | Type | Description |
|---|---|---|
| customer_idPK | INT | Unique customer identifier |
| customer_name | VARCHAR(120) | Customer's name |
| Column | Type | Description |
|---|---|---|
| loan_idPK | INT | Unique loan identifier |
| customer_id | INT | Customer associated with the loan |
| loan_amount | NUMERIC(12,2) | Principal amount of the loan |