Patrons Overdue Number of Days wise and Contact Information (Koha SQL Reports Queries)

Patrons Overdue Number of Days wise and Contact Information 
  • Crete the New SQL Report
  • Copy and Paste  following lines in the SQL report. Save and close.


SELECT borrowers.cardnumber, borrowers.surname, borrowers.firstname,
       borrowers.phone, borrowers.email, issues.date_due,
       (TO_DAYS(curdate())-TO_DAYS( date_due)) AS 'days overdue',
       biblio.title, biblio.author, items.itemcallnumber,
       items.barcode
FROM borrowers
LEFT JOIN issues ON (borrowers.borrowernumber=issues.borrowernumber)
LEFT JOIN items ON (issues.itemnumber=items.itemnumber)
LEFT JOIN biblio ON (items.biblionumber=biblio.biblionumber)
WHERE issues.branchcode = <<Branch Code>> AND (TO_DAYS(curdate())-TO_DAYS(
date_due)) >= <<Days overdue>>
ORDER BY borrowers.surname ASC, borrowers.firstname ASC, issues.date_due ASC

Run Report


Post a Comment

1 Comments