Are you good at dealing with SQL?
For the supplied loans and payments tables, write a query that summarizes payment activity for active loans. Include loans with no recorded payments and classify whether each loan has been paid in full.
loan_id, borrower_name, principal, total_paid, payment_count, and payment_status.loan_id ascending.| Column | Type | Description |
|---|---|---|
| loan_idPK | INT | Unique loan identifier |
| borrower_name | VARCHAR(100) | Borrower name |
| principal | NUMERIC(12,2) | Original principal balance |
| status | VARCHAR(20) | Current loan status |
| origination_date | DATE | Date the loan was originated |
| Column | Type | Description |
|---|---|---|
| payment_idPK | INT | Unique payment identifier |
| loan_id | INT | Loan associated with the payment |
| payment_date | DATE | Date the payment was recorded |
| payment_amount | NUMERIC(12,2) | Payment amount |