This query using label variables from the query service ( ?profLabel ) with the aggregation function works fine. But I had to explicitely name the ?profLabel variable in the wkibase:label call. I’d had expected the next query to work also (same without doing the explicit naming) but it does not work, blazegraph seem to not pick up the autonamed variables to work in agregation functions.
select ?person ?personLabel (group_concat(?citizenshipLabel;separator="/") as ?citizenships) { ?person wdt:P106 wd:Q3400985 ; wdt:P27 ?citizenship . SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } group by ?person ?personLabel having (count(?citizenship) > 2)
select ?person ?personLabel (group_concat(?citizenshipLabel;separator="/") as ?citizenships) { ?person wdt:P106 wd:Q3400985 ; wdt:P27 ?citizenship . SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". ?citizenship rdfs:label ?citizenshipLabel . ?person rdfs:label ?personLabel . } } group by ?person ?personLabel having (count(?citizenship) > 2)