mediumTenaga Nasional · basicsPro
Label TNB bills as on-time, late, or unpaid
TNB wants a status label for every electricity bill:
- Unpaid if it hasn't been paid yet (paid_date is missing)
- Paid on time if it was paid on or before the due date
- Paid late if it was paid after the due date
Return customer, amount, and status.
Schema
▸bills
| id | INT |
| customer | TEXT |
| amount | NUMERIC |
| due_date | DATE |
| paid_date | DATE |
Pro
The example input, expected output, and walkthrough for this question unlock with a Pro plan.
Pro
This is a Pro question
Premium practice questions unlock with a Pro plan. The full solution, expected output, and grading are available to Pro members.