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. Thanks in advance, Katharine Dixon Senior Technician Salinas Public Library
I am trying to install KOHA 3.0 on linux redhat, please let me know the required applications and the exact sequence to install. Thanks & Regards, Uma Sankar KSS Development, M248, MotechHouse, Mogra Village, Off Old Nagardas Road, Andheri East Desk : +91 66811533 Mobile : +91 9967007817 ----- Original Message ----- From: "Katharine Dixon" <katharin@ci.salinas.ca.us> To: koha@lists.katipo.co.nz Sent: Saturday, December 6, 2008 4:52:29 AM GMT +05:30 Chennai, Kolkata, Mumbai, New Delhi Subject: [Koha] SQL report 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. Thanks in advance, Katharine Dixon Senior Technician Salinas Public Library _______________________________________________ Koha mailing list Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha "Confidentiality Warning: This message and any attachments are intended only for the use of the intended recipient(s). are confidential. and may be privileged. If you are not the intended recipient. you are hereby notified that any review. re-transmission. conversion to hard copy. copying. circulation or other use of this message and any attachments is strictly prohibited. If you are not the intended recipient. please notify the sender immediately by return email. and delete this message and any attachments from your system. Virus Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email. The company cannot accept responsibility for any loss or damage arising from the use of this email or attachment."
Uma, When you download and extract Koha, you will find multiple text files named INSTALL.* (such as INSTALL.fedora7) that tell you how to install for a particular Linux flavor. Try them first. You can also try the guides at kohadocs.org Also, instead of responding to an unrelated thread, you probably want to start a new one to save yourself and others some confusion. Thanks and regards, krishnan mani Pune, India --- On Sat, 6/12/08, Uma Mukkamala <uma.mukkamala@ril.com> wrote: From: Uma Mukkamala <uma.mukkamala@ril.com> Subject: Re: [Koha] SQL report To: "Katharine Dixon" <katharin@ci.salinas.ca.us> Cc: koha@lists.katipo.co.nz Date: Saturday, 6 December, 2008, 11:01 AM I am trying to install KOHA 3.0 on linux redhat, please let me know the required applications and the exact sequence to install. Thanks & Regards, Uma Sankar KSS Development, M248, MotechHouse, Mogra Village, Off Old Nagardas Road, Andheri East Desk : +91 66811533 Mobile : +91 9967007817 ----- Original Message ----- From: "Katharine Dixon" <katharin@ci.salinas.ca.us> To: koha@lists.katipo.co.nz Sent: Saturday, December 6, 2008 4:52:29 AM GMT +05:30 Chennai, Kolkata, Mumbai, New Delhi Subject: [Koha] SQL report 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. Thanks in advance, Katharine Dixon Senior Technician Salinas Public Library _______________________________________________ Koha mailing list Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha "Confidentiality Warning: This message and any attachments are intended only for the use of the intended recipient(s). are confidential. and may be privileged. If you are not the intended recipient. you are hereby notified that any review. re-transmission. conversion to hard copy. copying. circulation or other use of this message and any attachments is strictly prohibited. If you are not the intended recipient. please notify the sender immediately by return email. and delete this message and any attachments from your system. Virus Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email. The company cannot accept responsibility for any loss or damage arising from the use of this email or attachment." _______________________________________________ Koha mailing list Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/
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'; cheers rickw -- _________________________________ Rick Welykochy || Praxis Services Finster's Law: A closed mouth gathers no feet.
On Sat, Dec 6, 2008 at 9:11 PM, Rick Welykochy <rick@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
SELECT count(*) FROM statistics WHERE type = 'issue' AND datetime > '2008-04-30' AND datetime < '2008-05-01'
Comparing this method with Josh's instructions for running the report in Koha: Koha reports 40705 circulations for all branches during the month of July 2008. I ran this query in mysql: select count(*) from statistics WHERE type = 'issue' AND datetime > '2008-06-30' AND datetime < '2008-08-01'; ...and got 44227. It looks like the reports interface in Koha is using the same logic as the SQL statement, so if you choose "Jul 1" through "Jul 31" on the date-pickers the report will not include circulations from those dates. Selecting "June 30" and "Aug. 1" as the start and end dates produces results that match the SQL. -- Owen -- Web Developer Athens County Public Libraries http://www.myacpl.org
Actually it is slightly trickier than that with the statistics table. You are passing it a DATE value (YYYY-MM-DD) and the "datetime" field is (reasonably enough) a DATETIME field (YYYY-MM-DD hh:mm::ss). So this has an interesting implication: it matches on comparison for lower bound only. The reason is that on the same date, ANY datetime sorts to after the date value with NO time. mysql> select "2007-12-06 17:25:39" < "2007-12-06"; +--------------------------------------+ | "2007-12-06 17:25:39" < "2007-12-06" | +--------------------------------------+ | 0 | +--------------------------------------+ 1 row in set (0.00 sec) mysql> select "2007-12-06 17:25:39" > "2007-12-06"; +--------------------------------------+ | "2007-12-06 17:25:39" > "2007-12-06" | +--------------------------------------+ | 1 | +--------------------------------------+ 1 row in set (0.00 sec) In my opinion, this is actually one version of what users would want, so they can put 9/1-10/1 and don't have to remember how many days September had. Note that this is data dependent, since the other report interfaces that query different tables (with regular date fields) will not behave this way on their own. This other behavior is probably what you were thinking of, Owen. The alternative, probably more correct approach would be to make both dates inclusive, such that you could limit to one day by specifying it as both lower and upper bound. This would require you to know how many days September had, but since we have a Calendar picker... it can remember for you. In the end, I don't think users care too much what logic is applied as long as it is documented and they can make efficient use of it. --Joe On Sat, Dec 6, 2008 at 10:35 AM, Owen Leonard <oleonard@myacpl.org> wrote:
SELECT count(*) FROM statistics WHERE type = 'issue' AND datetime > '2008-04-30' AND datetime < '2008-05-01'
Comparing this method with Josh's instructions for running the report in Koha:
Koha reports 40705 circulations for all branches during the month of July 2008.
I ran this query in mysql:
select count(*) from statistics WHERE type = 'issue' AND datetime > '2008-06-30' AND datetime < '2008-08-01';
...and got 44227. It looks like the reports interface in Koha is using the same logic as the SQL statement, so if you choose "Jul 1" through "Jul 31" on the date-pickers the report will not include circulations from those dates. Selecting "June 30" and "Aug. 1" as the start and end dates produces results that match the SQL.
-- Owen -- Web Developer Athens County Public Libraries http://www.myacpl.org
Hi Katharine, On Fri, Dec 5, 2008 at 6:22 PM, Katharine Dixon <katharin@ci.salinas.ca.us> 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. You can find this out from the Circulation Statistics wizard, located in the Reports area. The path is /cgi-bin/koha/reports/issues_stats.pl
Select Period as a row, and specify the dates in question as From/To. Select Library as a Column Run the report and you will get a chart of circulations per branch for that date range. Cheers, -- Joshua Ferraro SUPPORT FOR OPEN-SOURCE SOFTWARE CEO migration, training, maintenance, support LibLime Featuring Koha Open-Source ILS jmf@liblime.com |Full Demos at http://liblime.com/koha |1(888)KohaILS
participants (8)
-
Chris Cormack -
Joe Atzberger -
Joshua Ferraro -
Katharine Dixon -
Krishnan Mani -
Owen Leonard -
Rick Welykochy -
Uma Mukkamala