[Koha] Report: patrons with recent checkouts
Chad Roseburg
croseburg at ncrl.org
Sat Dec 7 06:47:08 NZDT 2013
Thanks Nicole, that worked perfectly.
Chad
On Fri, Dec 6, 2013 at 6:44 AM, Nicole Engard <nengard at gmail.com> wrote:
>
> On Thu, Dec 5, 2013 at 9:28 PM, Chad Roseburg <croseburg at ncrl.org> wrote:
>
>> SELECT count( distinct b.borrowernumber )
>> FROM borrowers b
>> JOIN old_issues i USING (borrowernumber)
>> WHERE b.branchcode = 'WENATCH'
>> AND i.issuedate > '2012-12-05';
>>
>
>
> Yes, but it won't include people with things currently checked out - those
> people are still in the issues table. So you might want (and this will
> slow it down a bit) to query that table too:
>
> SELECT count( distinct b.borrowernumber )
> FROM borrowers b
> JOIN (select borrowernumber, issuedate from old_issues union all select
> borrowernumber, issuedate from issues) i USING (borrowernumber)
> WHERE b.branchcode = 'WENATCH'
> AND i.issuedate > '2012-12-05';
>
--
Chad Roseburg
Automation Dept.
North Central Regional Library
More information about the Koha
mailing list