[Koha] SQL Help - Daily (on Monthly basis) & Monthly (on Yearly basis) Transactions Counts (Circulation)

Barton Chittenden barton at bywatersolutions.com
Tue Mar 7 02:31:01 NZDT 2017


On Mon, Mar 6, 2017 at 8:25 AM, Mark Alexander <marka at pobox.com> wrote:

>
> Pretty close!  Just some misplaced parens:
>
> SELECT
>       monthname(datetime),
>       SUM( IF(type = 'issue', 1, 0 )) as issues,
>       SUM( IF(type = 'renew', 1, 0 )) as renewals,
>       SUM( IF(type = 'return', 1, 0 )) as returns
>
>
Thanks Mark!

I've definitely done worse on a first draft ;-)


More information about the Koha mailing list