For every current loan in book_issue, work out when the book is due back. A member's allowed loan period in days is max_duration from the quota table, reached by joining book_issue to members (on member_no) and members to quota (on member_type). Return member_no, accession_no, doi, max_duration, and a computed column due_date equal to doi plus max_duration days. Sort by due_date ascending.
Database schema
primary keyforeign keyarrow points to the referenced columndrag to pan