query-1135839c8ce90cae5d3080cc7c547e3c
PoblaciĆ³ municipal a Catalunya del 2017. SELECT ?itemLabel ?comarcaLabel ?population WHERE { SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],ca". } ?item wdt:P31/wdt:P279* wd:Q2074737; wdt:P131 ?comarca; p:P1082 [ ps:P1082 ?population; pq:P585 ?data]. ?comarca wdt:P31 wd:Q937876. FILTER(YEAR(?data) = 2017). }
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#PoblaciĆ³ municipal a Catalunya del 2017.
SELECT ?itemLabel ?comarcaLabel ?population WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],ca". }
?item wdt:P31/wdt:P279* wd:Q2074737;
wdt:P131 ?comarca;
p:P1082 [ ps:P1082 ?population; pq:P585 ?data].
?comarca wdt:P31 wd:Q937876.
FILTER(YEAR(?data) = 2017).
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?comarca")
v1("?data")
v2("?item")
v4("?population"):::projected
a1((" "))
a2((" "))
c8(["wd:Q2074737"]):::iri
c5(["#91;AUTO_LANGUAGE#93;,ca"]):::literal
c3(["bd:serviceParam"]):::iri
c13(["wd:Q937876"]):::iri
f0[["year-from-dateTime(?data) = '2017^^xsd:integer'"]]
f0 --> v1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c3 --"wikibase:language"--> c5
end
v2 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c8
v2 --"p:direct/P131"--> v3
a2 --"p:statement/P1082"--> v4
a2 --"p:qualifier/P585"--> v1
v2 --"p:P1082"--> a2
v3 --"p:direct/P31"--> c13