As a tech, I have some background in SQL but I'm trying to get a handle on Koha's database and report system. I currently have two reports which are SQL created as far as I can tell. (I've tried to duplicate it via the Report Generator and it didn't work out for me). The SQL is: Today: SELECT distinctrow date(datetime) as Date, type as Type, count(*) as Count FROM statistics, borrowers WHERE (statistics.borrowernumber=borrowers.borrowernumber) AND datetime is not null AND date(datetime) = date(now()) group by type order by datetime Yesterday: SELECT distinctrow date(datetime) as Date, type as Type, count(*) as Count FROM statistics, borrowers WHERE (statistics.borrowernumber=borrowers.borrowernumber) AND datetime is not null AND date(datetime) = date(subdate(now(), interval 1 day)) group by type order by datetime I'm trying to add to this report the following: 1. A count of the number of new patron cards issued. 2. A count of the number of patron cards renewed. If anyone could give me a push in the right direction, I would appreciate it as I am lost right now.
participants (1)
-
Phillip Ponchot