Routine~12min
The Library Fine Still Accruing On A Returned Book
A patron disputed a $55 fine on a book she returned weeks ago. Turns out 5 checkouts have a returned_at date on file but their fine status is still "accruing" — the fine-closing job only triggers off due_date passing, not off the actual return, so a handful of returned books keep silently racking up charges. Books that are genuinely still out with a NULL returned_at and an accruing fine are correct — leave those.
Tables you'll query
checkoutsfines
What you'll learn
NULL HandlingDate & Time Functions