* Kerrie Stevens ([email protected]) wrote: > I am trying to run a report to give me the total number of items within each > of our collection codes (we have 5) at each branch but I can only get it show > me the results from one of them... can anyone see where I'm going wrong? > > SELECT count(ccode), ccode AS collection > FROM items > WHERE items.homebranch='VIC' > ORDER BY items.dateaccessioned DESC > > I have looked through the Reports Library but can't find anything to do this. > I've tried to adapt others but without any luck. >
Id try SELECT count(ccode), ccode AS collection, homebranch FROM items GROUP BY homebranch,ccode That should give you the count per code, per branch (Note I haven't tested this, just typed it into the mail client, so beware typos) Chris > Any help is much appreciated. > > Thank you, > > Kerrie Stevens > > > _______________________________________________ > Koha mailing list http://koha-community.org > [email protected] > http://lists.katipo.co.nz/mailman/listinfo/koha -- Chris Cormack Catalyst IT Ltd. +64 4 803 2238 PO Box 11-053, Manners St, Wellington 6142, New Zealand _______________________________________________ Koha mailing list http://koha-community.org [email protected] http://lists.katipo.co.nz/mailman/listinfo/koha

