How can I get all the groups a user belongs to using SQL-2
I created the following query, but I can not make it work.
SELECT user.*, group.* FROM [rep:User] AS user
INNER JOIN [rep:Group] AS group
ON ISDESCENDANTNODE(user, [/home/users])
WHERE user.[jcr:uuid] IN (group.[rep:members])
and user.[rep:principalName] = 'usertest'
I get the following error: expected: static operand.
Regards,
Isrhael