query-3903cb5467331b5ee9bdc6ee93b7c23b

rq turtle/ttl

Performers by province by editionHello! I'm trying to make this work. I want to show the province of the performers at a given performing contest by year. I have a problem when I filter the labels by language (I'm copying from some previous examples I have). How I'm doing this wrong? Thanks!

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:BarChart
SELECT ?year (COUNT(?herrialdea) AS ?count) (SAMPLE(?herrialdeaLabel) AS ?label) WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "eu,es,fr,en". }
  ?Bertsosaio wdt:P31 wd:Q8247090.
  ?Bertsosaio wdt:P710 ?bertsolari.
  ?bertsolari wdt:P19 ?jaiolekua.
  ?jaiolekua (wdt:P131*) ?herrialdea.
  {?herrialdea wdt:P31 wd:Q162620.}
  UNION
  {?herrialdea wdt:P31 wd:Q34876.}
  ?Bertsosaio wdt:P582 ?data.
  BIND(STR(YEAR(?data)) AS ?year)
  FILTER((LANG(?herrialdeaLabel)) = "eu")
}
GROUP BY ?herrialdeaLabel ?year

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?Bertsosaio") v3("?bertsolari") v8("?count") v6("?data") v5("?herrialdea"):::projected v1("?herrialdeaLabel"):::projected v4("?jaiolekua") v9("?label") v7("?year"):::projected c7(["wd:Q8247090"]):::iri c11(["wd:Q162620"]):::iri c3(["bd:serviceParam"]):::iri c5(["eu,es,fr,en"]):::literal c12(["wd:Q34876"]):::iri f0[["?herrialdeaLabel = 'eu'"]] f0 --> v1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c3 --"wikibase:language"--> c5 end v2 --"wdt:P31"--> c7 v2 --"wdt:P710"--> v3 v3 --"wdt:P19"--> v4 v4 --"wdt:P131"--> v5 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v5 --"wdt:P31"--> c12 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v5 --"wdt:P31"--> c11 end union0r <== or ==> union0l end v2 --"wdt:P582"--> v6 bind1[/"str(year-from-dateTime(?data))"/] v6 --o bind1 bind1 --as--o v7 bind4[/"count(?herrialdea)"/] v5 --o bind4 bind4 --as--o v8 bind5[/"sample(?herrialdeaLabel)"/] v1 --o bind5 bind5 --as--o v9