SELECT
s.SPACENAME AS space_name,
s.SPACEKEY AS space_key,
c.LASTMODDATE AS last_updated_date,
creator.username AS created_by,
c.CREATIONDATE AS creation_date,
modifier.username AS last_edited_by
FROM
SPACES s
JOIN
CONTENT c ON s.SPACEID = c.SPACEID
JOIN
USER_MAPPING creator ON c.CREATOR = creator.user_key
JOIN
USER_MAPPING modifier ON c.LASTMODIFIER = modifier.user_key
WHERE
c.CONTENTTYPE = 'PAGE'
AND c.PREVVER IS NULL -- only latest versions
AND c.CONTENT_STATUS = 'current'
ORDER BY
s.SPACENAME, c.LASTMODDATE DESC;
I used this query to get the last edited person for a particular space. Can someone optimize the query to get the last person who edited the page ?
Hello @Pooja Sathyaraj
This KB article should be the piece you're missing for your query.
If you have any questions, please let us know.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.