The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Database query

Vamsi Kandala
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
February 2, 2023

Hi all,

This is related to PostgreSQL query question:

I am using the following query to fetch all the Confluence spaces which has the specified group having permissions.

SELECT distinct s.spacekey, s.spacename
FROM SPACEPERMISSIONS sp
JOIN SPACES s ON s.SPACEID = sp.SPACEID
JOIN cwd_group g ON sp.PERMGROUPNAME = g.group_name
JOIN cwd_membership m ON g.id = m.parent_id
WHERE sp.permgroupname = '<group name>'
GROUP BY s.spacekey, s.spacename
ORDER BY s.spacename

This is working fine.  I want to extend this query further and retrieve all the space admins for each of the above spaces separated by comma in another column.

Any help is appreciated.

Thanks,
Vamsi

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Tommy Augustine
Contributor
February 2, 2023

I don't have jira server, so I cannot play with this to help out. But it sounds like you need to embed another query within the third column that concatenates the result set of space admins for a given space name in the where clause.

That's the best I can answer without playing with the query.

DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events