Report of Active Users for a Month

View: New views
7 Messages — Rating Filter:   Alert me  

Report of Active Users for a Month

by Melanie Hedgespeth :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

I am trying to create a report for active patrons within a specific month, divided up by patron category.

 

(I see you can create a patron statistics report for patron activity within “years”, but can’t get the code so I can adjust it to a month’s period.) 

 

Any tips?

 

Thanks!

 

Melanie Hedgespeth

Tech Center Manager

Salina Public Library

785.825.4624 Ext. 233

melanie@...

 

facebook_email

P Please consider the environment before printing this e-mail.

 



_______________________________________________
Koha mailing list
Koha@...
http://lists.katipo.co.nz/mailman/listinfo/koha

Re: Report of Active Users for a Month

by Jesse-34 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



2009/11/3 Melanie Hedgespeth <melanie@...>

I am trying to create a report for active patrons within a specific month, divided up by patron category.

 

(I see you can create a patron statistics report for patron activity within “years”, but can’t get the code so I can adjust it to a month’s period.) 

 

Any tips?

 

Thanks!

 

Melanie Hedgespeth

Tech Center Manager

Salina Public Library

785.825.4624 Ext. 233

melanie@...



I assume by "active", you mean "checked out books", right? If so, you'd want something like this:

SELECT YEAR(issuedate), MONTH(issuedate), categorycode, COUNT(DISTINCT borrowernumber) FROM old_issues LEFT JOIN borrowers USING (borrowernumber) GROUP BY YEAR(issuedate), MONTH(issuedate), categorycode;

Because it uses old_issues, it won't include anything that's still checked out; getting around that requires either ugly subqueries or running the report with old_issues and issues and manually combining the results.

--
Jesse Weaver

_______________________________________________
Koha mailing list
Koha@...
http://lists.katipo.co.nz/mailman/listinfo/koha

Re: Report of Active Users for a Month

by Melanie Hedgespeth :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Thanks.

Does issue date refer to the date the item was checked out?

 

I’m getting just a handful of issues so I’m off somewhere on it.

 

Thanks.

 

Melanie

facebook_email

 

From: Jesse [mailto:pianohacker@...]
Sent: Tuesday, November 03, 2009 1:20 PM
To: Melanie Hedgespeth
Cc: koha@...
Subject: Re: [Koha] Report of Active Users for a Month

 

 

2009/11/3 Melanie Hedgespeth <melanie@...>

I am trying to create a report for active patrons within a specific month, divided up by patron category.

 

(I see you can create a patron statistics report for patron activity within “years”, but can’t get the code so I can adjust it to a month’s period.) 

 

Any tips?

 

Thanks!

 

Melanie Hedgespeth

Tech Center Manager

Salina Public Library

785.825.4624 Ext. 233

melanie@...

 


I assume by "active", you mean "checked out books", right? If so, you'd want something like this:

SELECT YEAR(issuedate), MONTH(issuedate), categorycode, COUNT(DISTINCT borrowernumber) FROM old_issues LEFT JOIN borrowers USING (borrowernumber) GROUP BY YEAR(issuedate), MONTH(issuedate), categorycode;

Because it uses old_issues, it won't include anything that's still checked out; getting around that requires either ugly subqueries or running the report with old_issues and issues and manually combining the results.

--
Jesse Weaver



_______________________________________________
Koha mailing list
Koha@...
http://lists.katipo.co.nz/mailman/listinfo/koha

Re: Report of Active Users for a Month

by Jesse-34 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



2009/11/3 Melanie Hedgespeth <melanie@...>

Thanks.

Does issue date refer to the date the item was checked out?

 

I’m getting just a handful of issues so I’m off somewhere on it.

 

Thanks.

 

Melanie

facebook_email

 

From: Jesse [mailto:pianohacker@...]
Sent: Tuesday, November 03, 2009 1:20 PM
To: Melanie Hedgespeth
Cc: koha@...
Subject: Re: [Koha] Report of Active Users for a Month

 

 

2009/11/3 Melanie Hedgespeth <melanie@...>

I am trying to create a report for active patrons within a specific month, divided up by patron category.

 

(I see you can create a patron statistics report for patron activity within “years”, but can’t get the code so I can adjust it to a month’s period.) 

 

Any tips?

 

Thanks!

 

Melanie Hedgespeth

Tech Center Manager

Salina Public Library

785.825.4624 Ext. 233

melanie@...

 


I assume by "active", you mean "checked out books", right? If so, you'd want something like this:

SELECT YEAR(issuedate), MONTH(issuedate), categorycode, COUNT(DISTINCT borrowernumber) FROM old_issues LEFT JOIN borrowers USING (borrowernumber) GROUP BY YEAR(issuedate), MONTH(issuedate), categorycode;

Because it uses old_issues, it won't include anything that's still checked out; getting around that requires either ugly subqueries or running the report with old_issues and issues and manually combining the results.

--
Jesse Weaver

issuedate is the date the item was checked out, yes.

A quick run of the SQL seemed to work on my library's data, but the use of issuedate does mean that it won't include any data migrated from Koha 2.2; it'll only include checkouts made under Koha 3.0.

Substituting issuedate for date_due or returndate will include results from Koha 2.2, but will skew the results (as these refer to the due date and date the item was returned, respectively).

--
Jesse Weaver


_______________________________________________
Koha mailing list
Koha@...
http://lists.katipo.co.nz/mailman/listinfo/koha

Re: Report of Active Users for a Month

by Melanie Hedgespeth :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Thanks.  I realized I wasn’t seeing all the results.

 

On screen, I wasn’t getting the full list.  Once I downloaded it then I saw the rest!

 

Thanks.

 

Melanie

facebook_email

 

From: Jesse [mailto:pianohacker@...]
Sent: Tuesday, November 03, 2009 1:43 PM
To: Melanie Hedgespeth
Cc: koha@...
Subject: Re: [Koha] Report of Active Users for a Month

 

 

2009/11/3 Melanie Hedgespeth <melanie@...>

Thanks.

Does issue date refer to the date the item was checked out?

 

I’m getting just a handful of issues so I’m off somewhere on it.

 

Thanks.

 

Melanie

facebook_email

 

From: Jesse [mailto:pianohacker@...]
Sent: Tuesday, November 03, 2009 1:20 PM
To: Melanie Hedgespeth
Cc: koha@...
Subject: Re: [Koha] Report of Active Users for a Month

 

 

2009/11/3 Melanie Hedgespeth <melanie@...>

I am trying to create a report for active patrons within a specific month, divided up by patron category.

 

(I see you can create a patron statistics report for patron activity within “years”, but can’t get the code so I can adjust it to a month’s period.) 

 

Any tips?

 

Thanks!

 

Melanie Hedgespeth

Tech Center Manager

Salina Public Library

785.825.4624 Ext. 233

melanie@...

 


I assume by "active", you mean "checked out books", right? If so, you'd want something like this:

SELECT YEAR(issuedate), MONTH(issuedate), categorycode, COUNT(DISTINCT borrowernumber) FROM old_issues LEFT JOIN borrowers USING (borrowernumber) GROUP BY YEAR(issuedate), MONTH(issuedate), categorycode;

Because it uses old_issues, it won't include anything that's still checked out; getting around that requires either ugly subqueries or running the report with old_issues and issues and manually combining the results.

--
Jesse Weaver

issuedate is the date the item was checked out, yes.

A quick run of the SQL seemed to work on my library's data, but the use of issuedate does mean that it won't include any data migrated from Koha 2.2; it'll only include checkouts made under Koha 3.0.

Substituting issuedate for date_due or returndate will include results from Koha 2.2, but will skew the results (as these refer to the due date and date the item was returned, respectively).

--
Jesse Weaver



_______________________________________________
Koha mailing list
Koha@...
http://lists.katipo.co.nz/mailman/listinfo/koha

Re: Report of Active Users for a Month

by Melanie Hedgespeth :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Added this to the KOHA reports wiki. 

 

 

Melanie

facebook_email

 

From: koha-bounces@... [mailto:koha-bounces@...] On Behalf Of Melanie Hedgespeth
Sent: Tuesday, November 03, 2009 1:50 PM
To: Jesse
Cc: koha@...
Subject: Re: [Koha] Report of Active Users for a Month

 

Thanks.  I realized I wasn’t seeing all the results.

 

On screen, I wasn’t getting the full list.  Once I downloaded it then I saw the rest!

 

Thanks.

 

Melanie

facebook_email

 

From: Jesse [mailto:pianohacker@...]
Sent: Tuesday, November 03, 2009 1:43 PM
To: Melanie Hedgespeth
Cc: koha@...
Subject: Re: [Koha] Report of Active Users for a Month

 

 

2009/11/3 Melanie Hedgespeth <melanie@...>

Thanks.

Does issue date refer to the date the item was checked out?

 

I’m getting just a handful of issues so I’m off somewhere on it.

 

Thanks.

 

Melanie

facebook_email

 

From: Jesse [mailto:pianohacker@...]
Sent: Tuesday, November 03, 2009 1:20 PM
To: Melanie Hedgespeth
Cc: koha@...
Subject: Re: [Koha] Report of Active Users for a Month

 

 

2009/11/3 Melanie Hedgespeth <melanie@...>

I am trying to create a report for active patrons within a specific month, divided up by patron category.

 

(I see you can create a patron statistics report for patron activity within “years”, but can’t get the code so I can adjust it to a month’s period.) 

 

Any tips?

 

Thanks!

 

Melanie Hedgespeth

Tech Center Manager

Salina Public Library

785.825.4624 Ext. 233

melanie@...

 


I assume by "active", you mean "checked out books", right? If so, you'd want something like this:

SELECT YEAR(issuedate), MONTH(issuedate), categorycode, COUNT(DISTINCT borrowernumber) FROM old_issues LEFT JOIN borrowers USING (borrowernumber) GROUP BY YEAR(issuedate), MONTH(issuedate), categorycode;

Because it uses old_issues, it won't include anything that's still checked out; getting around that requires either ugly subqueries or running the report with old_issues and issues and manually combining the results.

--
Jesse Weaver

issuedate is the date the item was checked out, yes.

A quick run of the SQL seemed to work on my library's data, but the use of issuedate does mean that it won't include any data migrated from Koha 2.2; it'll only include checkouts made under Koha 3.0.

Substituting issuedate for date_due or returndate will include results from Koha 2.2, but will skew the results (as these refer to the due date and date the item was returned, respectively).

--
Jesse Weaver



_______________________________________________
Koha mailing list
Koha@...
http://lists.katipo.co.nz/mailman/listinfo/koha

Re: Report of Active Users for a Month

by Nicole Engard-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Woo Hoo :) My nagging has paid off :)

Nicole

2009/11/3 Melanie Hedgespeth <melanie@...>

Added this to the KOHA reports wiki. 

 

 

Melanie

facebook_email

 

From: koha-bounces@... [mailto:koha-bounces@...] On Behalf Of Melanie Hedgespeth
Sent: Tuesday, November 03, 2009 1:50 PM
To: Jesse


Cc: koha@...
Subject: Re: [Koha] Report of Active Users for a Month

 

Thanks.  I realized I wasn’t seeing all the results.

 

On screen, I wasn’t getting the full list.  Once I downloaded it then I saw the rest!

 

Thanks.

 

Melanie

facebook_email

 

From: Jesse [mailto:pianohacker@...]
Sent: Tuesday, November 03, 2009 1:43 PM
To: Melanie Hedgespeth
Cc: koha@...
Subject: Re: [Koha] Report of Active Users for a Month

 

 

2009/11/3 Melanie Hedgespeth <melanie@...>

Thanks.

Does issue date refer to the date the item was checked out?

 

I’m getting just a handful of issues so I’m off somewhere on it.

 

Thanks.

 

Melanie

facebook_email

 

From: Jesse [mailto:pianohacker@...]
Sent: Tuesday, November 03, 2009 1:20 PM
To: Melanie Hedgespeth
Cc: koha@...
Subject: Re: [Koha] Report of Active Users for a Month

 

 

2009/11/3 Melanie Hedgespeth <melanie@...>

I am trying to create a report for active patrons within a specific month, divided up by patron category.

 

(I see you can create a patron statistics report for patron activity within “years”, but can’t get the code so I can adjust it to a month’s period.) 

 

Any tips?

 

Thanks!

 

Melanie Hedgespeth

Tech Center Manager

Salina Public Library

785.825.4624 Ext. 233

melanie@...

 


I assume by "active", you mean "checked out books", right? If so, you'd want something like this:

SELECT YEAR(issuedate), MONTH(issuedate), categorycode, COUNT(DISTINCT borrowernumber) FROM old_issues LEFT JOIN borrowers USING (borrowernumber) GROUP BY YEAR(issuedate), MONTH(issuedate), categorycode;

Because it uses old_issues, it won't include anything that's still checked out; getting around that requires either ugly subqueries or running the report with old_issues and issues and manually combining the results.

--
Jesse Weaver

issuedate is the date the item was checked out, yes.

A quick run of the SQL seemed to work on my library's data, but the use of issuedate does mean that it won't include any data migrated from Koha 2.2; it'll only include checkouts made under Koha 3.0.

Substituting issuedate for date_due or returndate will include results from Koha 2.2, but will skew the results (as these refer to the due date and date the item was returned, respectively).

--
Jesse Weaver


_______________________________________________
Koha mailing list
Koha@...
http://lists.katipo.co.nz/mailman/listinfo/koha




_______________________________________________
Koha mailing list
Koha@...
http://lists.katipo.co.nz/mailman/listinfo/koha