Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,458,300
Community Members
 
Community Events
176
Community Groups

Is there any provision to get the Last Viewed Space details of a space from confluence?

Hi team,

I am just looking for query in SQL or a method in groovy to get the details of last viewed dates of each item in confluence.

SELECT SPACE_KEY, LAST_VIEW_DATE from "AO_92296B_AORECENTLY_VIEWED"

I found out this query would help, but its not getting the actual stats(I mean the entire space details)

Appreciating any help!!

1 answer

Hi @Mohammed Siyad ,

You can get a small report with the following sql query. You can check the tables used for detailing.

SELECT c.title, av."SPACE_KEY", u.username AS Viewer, av."LAST_VIEW_DATE"
FROM content c
JOIN "AO_92296B_AORECENTLY_VIEWED" av ON c.contentid=av."CONTENT_ID"
JOIN user_mapping u ON av."USER_KEY" = u.user_key
JOIN user_mapping um ON c.lastmodifier = um.user_key
WHERE prevver IS NULL
AND contenttype = 'PAGE'
ORDER BY title;

Will this get the data of the entire space thats there in confluence because I am looking for a data which gives like this : @Mehmet Şirin Usanmaz 

Space Key/Space NameLast Viewed Date
ABCDate
FGHDate

Hi @Mohammed Siyad ,

You can use this query

SELECT DISTINCT "SPACE_KEY" as "Space Key", MAX("LAST_VIEW_DATE") as "Last Viewed Date"
FROM "AO_92296B_AORECENTLY_VIEWED"
GROUP BY "SPACE_KEY"

Hi @Mehmet Şirin Usanmaz ,

Still its not retreiving the entire space Last Viewed Details stats. I am in a way to setup a report which has list of active users in a space and Last Viewed Date of a space.

Hi @Mehmet Şirin Usanmaz ,

Tried the query but it gives the data of past 1 month only, i do have like around 100+ spaces. Is there any possibility like we can get it for past 1year.

Capture.JPG

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events