SELECT count(statistics.type) AS 'wypozyczen + przedluzen',items.itemcallnumber as sygnatura, statistics.branch as biblioteka
FROM statistics, items
WHERE items.itemnumber = statistics.itemnumber and DATE(statistics.datetime) =<<Data(yyyy-mm-dd)|date>> and (statistics.type = 'issue' OR statistics.type ='renew') AND statistics.branch = <<Biblioteka|branches>>
GROUP BY items.itemcallnumber
ORDER BY items.itemcallnumber ASC