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
Community Members
Community Events
Community Groups

Query for licensed users

ukhan I'm New Here Jun 13, 2022


I am looking for a query that shows all the users who accessed one space and no other, ever since they were created or within a span of time (6 months).

1 answer

0 votes
Srinatha T Atlassian Team Jun 14, 2022

Hi @ukhan ,

Welcome to Atlassian community. 

So you want to list all users counting for the license ? if that is your requirement below is the query.

SELECT COUNT(distinct cwd_user.user_name),
FROM cwd_group
INNER JOIN cwd_membership ON cwd_membership.parent_id=
INNER JOIN cwd_user ON = cwd_membership.child_user_id
AND cwd_user.lower_user_name IN
(SELECT u.lower_user_name
FROM cwd_user u
JOIN cwd_membership m ON = child_user_id
JOIN cwd_group g ON m.parent_id =
JOIN cwd_directory d ON u.directory_id =
AND = 'T'
AND = 'T'
GROUP BY u.lower_user_name,
GROUP BY cwd_group.group_name
ORDER BY COUNT(cwd_user.user_name) DESC;


Srinath T 

ukhan I'm New Here Jun 14, 2022

That is correct, but you are missing the main requriement....which users accessed a specifc space such as "HR Department" and no other space.

Srinatha T Atlassian Team Jun 14, 2022

@ukhan  , Its tricky . I will let you know if i had any success in accomplishing the above requirement. 


Srinath T

Like ukhan likes this

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence

An update on Confluence Cloud customer feedback – June 2022

Hi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...

201 views 1 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you