SQL to see pages views with users

Jacynthe.Thibault April 28, 2023

Hi,

 

I need an SQL query that we can run in our confluence to get a list of users who view each pages (with the date they last viewed the page).  Thanks

Something like:

PagesWhoDate
Page AadoirApril 25, 2023
Page AfthiuApril 24, 2023
Page BrtyuhFebruary 20, 2022
Page ClkjgkiJanuary 10, 2020

1 answer

0 votes
Clark Everson
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 28, 2023

Hi @Jacynthe.Thibault 

Can you try in your staging instance

SELECT
cwd_user.user_name AS username,
content.title AS page_title,
content.creationdate AS page_creation_date,
content.lastmoddate AS page_last_modified_date,
page_view.date AS view_date
FROM
content
JOIN page_view ON content.contentid = page_view.contentid
JOIN cwd_user ON page_view.username = cwd_user.user_name
WHERE
content.contenttype = 'PAGE'
ORDER BY
cwd_user.user_name,
page_view.date;
Jacynthe.Thibault May 2, 2023

@Clark Everson   Thanks  We tried it but the page_view was not find as table or view, it seems that it is not in the DB

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events