[Koha] Overdue report/count at year-end

Steven Nickerson snicker1 at maine.rr.com
Mon Aug 4 06:38:45 NZST 2014


Thanks for the pointer/suggestion Katrin!   With your comment and a little
help Googling, I came up with the following that seems to produce the
monthly count I was looking for:
SELECT monthname(returndate) AS `MONTH`, COUNT(*) AS `OVERDUES`
FROM old_issues WHERE returndate > date_due and returndate > "2014-01-01
00:00:00"
GROUP BY month(returndate);


For now I hard-coded the 1/1/2014 starting date but that could easily be
made a "variable" as well and then an end date of 12/31/<year> could be
added to make it runnable for any given year, not just 2014.

-----Original Message-----
From: Katrin Fischer [mailto:Katrin.Fischer.83 at web.de] 
Sent: Saturday, August 02, 2014 8:13 AM
To: koha at lists.katipo.co.nz
Subject: Re: [Koha] Overdue report/count at year-end

Hi Steve,

I think I'd start with comparing the date_due and the returndate in
old_issues to figure out which items were returned late and go from there.

Hope this helps,

Katrin

Am 01.08.2014 um 18:02 schrieb Steven Nickerson:
> Hello everyone,
> 
>     We have implemented one of the overdue reports from the Report 
> Library and that gives us a snapshot of the overdue count at the point 
> in time when the report is run, but is there any way to get a count 
> (by month, for
> example) of the number of items that were overdue throughout a year?
> 
>  
> 
> Thanks!
> 
> Steve
> 
> _______________________________________________
> Koha mailing list  http://koha-community.org Koha at lists.katipo.co.nz 
> http://lists.katipo.co.nz/mailman/listinfo/koha
> 





More information about the Koha mailing list