Hi everbody
I want to list all the users and last login date in a specific group. But don't know why the list is not enough. Below is my query, please advice me how to correct it.
If I removed "JOIN logininfo l on um.user_key = l.username", it can list correct amount of users in group "abc".
use confluence;
SELECT u.display_name, g.group_name, u.active, l.SUCCESSDATE
FROM cwd_user u
JOIN cwd_membership m ON u.id = child_user_id
JOIN cwd_group g ON m.parent_id = g.id
JOIN SPACEPERMISSIONS sp ON g.group_name = sp.PERMGROUPNAME
JOIN user_mapping um on u.lower_user_name = um.lower_username
JOIN logininfo l on um.user_key = l.username
WHERE u.active = 'T' And g.lower_group_name = 'abc'
GROUP BY u.lower_user_name