SELECT DATE_FORMAT(action_logs.timestamp,'%d/%m/%Y') AS 'Date', COUNT(DISTINCT(biblio.biblionumber)) as 'Records', COUNT(DISTINCT(items.barcode)) as 'Items' FROM `action_logs` LEFT JOIN biblioitems on action_logs.object = biblioitems.biblionumber LEFT JOIN items on items.biblionumber = biblioitems.biblionumber LEFT JOIN biblio on biblio.biblionumber = items.biblionumber RIGHT JOIN borrowers on borrowers.borrowernumber = action_logs.user WHERE action_logs.action = 'ADD' AND action_logs.module = 'CATALOGUING' AND action_logs.timestamp BETWEEN '2018-12-01' AND '2018-12-31' AND info LIKE 'biblio%' GROUP BY Date ORDER BY Date Desc
SELECT items.itype, itemtypes.description, count(DISTINCT items.biblionumber) AS Titles, count(items.itemnumber) AS Items FROM items, itemtypes WHERE items.itype=itemtypes.itemtype AND items.barcode IS NOT NULL GROUP BY items.itype ORDER BY itemtypes.description
Comments
Post a Comment