Hi Bravismore
I can tell you what I do, though I'm no expert in this. Also, this is on DSpace 6.3.
1. Items added last month & 2. Items added in a given year (between given dates)
Query the postgres db directly using psql:
SELECT cm.community_id, substring(mv.text_value,1,7) AS year_month, count(*) AS num_items_added
FROM metadatavalue mv, item it, collection co, community cm, community2collection c2c
WHERE mv.dspace_object_id = it.uuid
AND it.owning_collection = co.uuid
AND co.uuid = c2c.collection_id
AND c2c.community_id = cm.uuid
AND mv.metadata_field_id = 11
AND it.in_archive AND text_value >= '2019-09'
AND text_value < '2019-10' GROUP BY 1, 2 ORDER BY 1;
3. Total Items in repository
I add up the item totals for each community displayed in the UI. You'll need this in your config file: webui.strengths.show = true
4. Item views in the past month & 5. Item views in a given year (between given dates)
and these are the solr queries that I use:
- downloads:
/solr/statistics/select?q=type:0+owningColl:9+isBot:false+time:[2017-06-01T00:00:00Z+TO+2017-07-01T00:00:00Z]&fq=-(bundleName:[*+TO+*]-bundleName:ORIGINAL)&indent=on&rows=0
- visits:
/solr/statistics/select?q=type:2+owningColl:9+isBot:false+time:[2017-06-01T00:00:00Z+TO+2017-07-01T00:00:00Z]&indent=on&rows=0
6. Total item views
I've never considered this, but I should think a variation on the SQL above should work.
Sean