Small correction for views stats generation

This commit is contained in:
Spyros Zoupanos 2020-10-23 15:24:24 +03:00
parent 6b5b6796b7
commit 8b591937e1
1 changed files with 2 additions and 1 deletions

View File

@ -356,7 +356,8 @@ public class PiwikStatsDB {
"COUNT(entity_id) as views, SUM(CASE WHEN referrer_name LIKE '%openaire%' THEN 1 ELSE 0 END) " +
"AS openaire_referrer, " +
"CONCAT(YEAR(timestamp), '/', LPAD(MONTH(timestamp), 2, '0')) AS month, source " +
"FROM `usagestats_13`.piwiklogtmp where action='action' and (source_item_type='oaItem' or " +
"FROM " + ConnectDB.getUsageStatsDBSchema()
+ ".piwiklogtmp where action='action' and (source_item_type='oaItem' or " +
"source_item_type='repItem') " +
"GROUP BY entity_id, CONCAT(YEAR(timestamp), '/', LPAD(MONTH(timestamp), 2, '0')), " +
"source ORDER BY source, entity_id";