I have following sparql query:
What this query does is it returns the matching user. So, if a user "A" has 3 roles listed : editor, admin and moderator, it displays only two roles for user. like :
What i wanted to do from query is : since user A matches any of the given filter conditions, all it's roles should be listed. Is there a way to improve this query? I have tried using sub select and regex in filters as well, but :(
Thanks in advance
asked 13 Dec '12, 06:40
Your problem is the FILTER. Imagine a query without a filter and grouping. It would return
The filter elimintates the first result and the the remaining two are concatenated.
Off the top of my head you could use a subquery to get all user URIs and the select the needed triples (not sure this will work but you you should get the idea).
The plus of this should no need for any FILTERs, which should positively affect performance. I'm not sure though ;)