query-670b10d69f35d8edef0bb64a849fc5c9
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel (GROUP_CONCAT(DISTINCT(?LieuLabel); separator=", ") as ?Lieux)
WHERE
{
?item wdt:P31/wdt:P279* wd:Q166118;
wdt:P17 wd:Q142.
OPTIONAL {?item wdt:P131 ?Lieu.
OPTIONAL {?Lieu rdfs:label ?LieuLabel. filter(lang(?LieuLabel)="en") }
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".}
}
GROUP BY ?item ?itemLabel
ORDER BY ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?Lieu")
v3("?LieuLabel"):::projected
v5("?Lieux")
v2("?item"):::projected
v1("?itemLabel"):::projected
a1((" "))
c3(["wd:Q166118"]):::iri
c10(["bd:serviceParam"]):::iri
c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c5(["wd:Q142"]):::iri
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
v2 --"wdt:P17"--> c5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P131".-> v4
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."rdfs:label".-> v3
end
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end
bind1[/"?LieuLabel"/]
v3 --o bind1
bind1 --as--o v5