I am trying to determine inactive spaces in Confluence. I dont want to query by last modified date. Since users can still use/view a space even though they are not making any updates to content.
So I decided to write a query by last viewed date using below query.
SELECT S.SPACENAME, V.[SPACE_KEY], MAX(V.LAST_VIEW_DATE) as LastViewDate
FROM [AO_92296B_AORECENTLY_VIEWED] V, [SPACES] S
WHERE (V.[SPACE_KEY] = S.[SPACEKEY] AND S.[SPACETYPE] = 'global')
GROUP BY S.SPACENAME, V.[SPACE_KEY] ORDER BY LastViewDate ASC;
But I have a feeling that [AO_92296B_AORECENTLY_VIEWED] is not the right table, because when I go to SPACES table it shows 289 global spaces. However when I use above query to figure our last viewed date for those spaces I only get 232 results.
Any advise is greatly appreciated.