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 Leaders.
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

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.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events