query-6013a2fff5a34489c84ae83938052a13
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 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#>
SELECT ?item ?itemLabel ?population ?year WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?item wdt:P31 wd:Q2074737;
(wdt:P131*) wd:Q93366.
?item p:P1082 ?pop.
?pop ps:P1082 ?population.
?pop pq:P585 ?date.
BIND(YEAR(?date) as ?year).
VALUES ?YY {"2010" "2020"}
FILTER CONTAINS(?year, ?YY).
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?YY")
v6("?date")
v3("?item"):::projected
v4("?pop")
v5("?population"):::projected
v7("?year"):::projected
c6(["wd:Q2074737"]):::iri
c2(["bd:serviceParam"]):::iri
c8(["wd:Q93366"]):::iri
c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["contains(?year,?YY)"]]
f0 --> v7
f0 --> v7
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
v3 --"p:direct/P31"--> c6
v3 --"p:direct/P131"--> c8
v3 --"p:P1082"--> v4
v4 --"p:statement/P1082"--> v5
v4 --"p:qualifier/P585"--> v6
bind1[/"year-from-dateTime(?date)"/]
v6 --o bind1
bind1 --as--o v7
bind2[/VALUES ?YY/]
bind2-->v7
bind20(["2010"])
bind20 --> bind2
bind21(["2020"])
bind21 --> bind2