[Koha] Another report request -- Active Cardholders

Church, Beverly bchurch at liblime.com
Thu Feb 10 11:22:20 NZDT 2011


Hi Cab,

Here's the query with a date range:

select borrowers.surname, borrowers.firstname, borrowers.cardnumber,
borrowers.categorycode, borrowers.dateexpiry from statistics, borrowers
where statistics.borrowernumber = borrowers.borrowernumber and
statistics.type = 'issue' group by statistics.borrowernumber having
max(date(datetime)) between 'YYYY-MM-DD' and 'YYYY-MM-DD' order by
borrowers.surname, borrowers.firstname

Bev

* * * *
Beverly Church
LibLime Project Manager

phone: 1-888-564-2457 ext. 717
            1-301-654-8088 ext. 292
email: bchurch at liblime.com
skype: beverlychurch


On Wed, Feb 9, 2011 at 5:11 PM, Cab Vinton <bibliwho at gmail.com> wrote:

> Thank you, Bev!
>
> Seems to work fine for our small library.
>
> The only improvement would be to be able to specify a date range, the
> syntax for which isn't immediately obvious to me.
>
> Thank you again,
>
> Cab Vinton, Director
> Sanbornton Public Library
> Sanbornton, NH
>
>
>
>
> On Wed, Feb 9, 2011 at 4:48 PM, Church, Beverly <bchurch at liblime.com>
> wrote:
> > select borrowers.surname, borrowers.firstname, borrowers.cardnumber,
> > borrowers.categorycode, borrowers.dateexpiry from statistics, borrowers
> > where statistics.borrowernumber = borrowers.borrowernumber and
> > statistics.type = 'issue' group by statistics.borrowernumber having
> > max(date(datetime)) >= 'YYYY-MM-DD' order by borrowers.surname,
> > borrowers.firstname
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.katipo.co.nz/pipermail/koha/attachments/20110209/b897bbdd/attachment.htm 


More information about the Koha mailing list