Days remaining until subscription expiry
Using 2026-08-01 as "today", compute how many days remain until each subscription expires. A subscription that already expired should show a negative number.
Return customer, expiry_date, and days_remaining.
Schema
| id | INT |
| customer | TEXT |
| expiry_date | DATE |
Example input
Stuck? Ask the coach for a nudge that won't give the answer away, or reveal the reference solution and a short walkthrough of why it works.
The interviewer's next question
Turn days_remaining into a status label: 'Expired' if negative, 'Expiring today' if exactly zero, 'Active' otherwise. Return customer, days_remaining, status.
Solving follow-ups — the questions an interviewer actually asks next — unlocks with a Basic plan.
See Basic plansRM 25/mo · cancel anytime
Telekom wants a renewal-reminder flag instead: 'Expired' for anything already past due, 'Renew soon' for anything expiring within the next 7 days (today included), and 'OK' for everything further out.
Solving follow-ups — the questions an interviewer actually asks next — unlocks with a Basic plan.
See Basic plansRM 25/mo · cancel anytime