Changes: QB unit test/data: Use "grouped" SPARQL syntax
[qtcontacts-tracker:hasselmms-qtcontacts-tracker.git] / tests / ut_qtcontacts_trackerplugin_querybuilder / data / 104-Group-EmailAddress.rq
1 SELECT
2   ?_contact tracker:id(?_contact)
3   ?_context rdfs:label(?_context)
4
5  (SELECT
6     GROUP_CONCAT(
7         fn:concat(
8             ?_email,
9             "\u001f",
10             fn:concat(
11                 nco:emailAddress(?_email),
12                 "\u001c",
13                 tracker:coalesce((SELECT ?g WHERE { GRAPH ?g { ?_contact nco:hasEmailAddress ?_email } }),""))),
14         "\u001e")
15   WHERE {
16     ?_contact nco:hasEmailAddress ?_email
17   })
18
19 WHERE {
20   ?_contact rdf:type nco:ContactGroup, nco:Contact
21
22   OPTIONAL { ?_contact nco:hasAffiliation ?_context }
23 }