JCR-SQL2 Query to get reference statistics for assets
Dear AEM Community,
Can you please offer guidance on a way to do any of the following, either with the Bulk Editor or through ACS-Commons Reports:
- Get a COUNT of all references for assets at a certain path
- Get the list of references for all assets at a certain path
What I would like to achieve is to get a summary of all our assets that are used vs. not used on live pages (i.e. assets with live References) to be able to clean them, de-duplicate, etc.
I know there is a default 'References Report' in ACS-Commons that finds all of the references to the provided page and any subpages, but while it does allow to select Type (All / Pages / Assets), I do not see any results coming back for the parent folder of certain Assets I know have references. The query in the References Report is:
SELECT * FROM [dam:Asset] AS s WHERE CONTAINS(s.*, '/content/dam/.../products/.../...')
Thank you,
Alex