mahir_data
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
idINT
customerTEXT
amountNUMERIC
due_dateDATE
paid_dateDATE

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.

See Pro plans