[Koha] SQL report [of number of issues]

Chris Cormack chris at bigballofwax.co.nz
Sat Dec 6 21:22:13 NZDT 2008


On Sat, Dec 6, 2008 at 9:11 PM, Rick Welykochy <rick at praxis.com.au> wrote:
> Katharine Dixon wrote:
>
>> Hello, I am new to the list so sorry if this has been asked before but
>> does anybody have the SQL for a report that would just give me a total
>> of all */items/* circulated on a certain day.  Just the number, no
>> titles or types.
>
> If by circulated you mean issued/withdrawn:
>
> select count(*) from issues where issuedate = '2008-04-30';
>
This won't work for Koha 3.0 and even older versions of Koha where
past issues are expunged.
For Koha 3.0 only current issues are held in the issues table. So this
will only count items that are still on issue.

For 3.0 (and this will work in all versions of 2.2 also)

SELECT count(*) FROM statistics WHERE type = 'issue' AND datetime >
'2008-04-30' AND datetime < '2008-05-01'

(For the 30th of april 2008)

Chris


More information about the Koha mailing list