Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Overdue Unreturned Books

Today is 2026-10-01. Return the loan id of every book that has not been returned (returned_date IS NULL) and whose due date is before today, ordered by id.

Table schema

Loans(id INT PRIMARY KEY, member_id INT, book_id INT, due_date DATE, returned_date DATE)

Sample data

id | member_id | book_id | due_date | returned_date
1 | 1 | 10 | 2026-09-20 | NULL
2 | 2 | 11 | 2026-09-25 | 2026-09-24
3 | 3 | 12 | 2026-10-05 | NULL
4 | 1 | 13 | 2026-09-10 | NULL

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.