query-b16afc4a00ad2cfceb0e2e5b3271c71b
Estimation de population 2021 des régions
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
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 DISTINCT ?locationLabel (SUM(?population) AS ?totalPopulation)
WHERE {
{?item wdt:P31 wd:Q104782082} union {?item wdt:P31 wd:Q204613}
{?item p:P1082 [ ps:P1082 ?population; pq:P459 wd:Q29051383; pq:P585 ?date ] }
FILTER (?date >= "2020-07-01T00:00:00Z"^^xsd:dateTime )
?item wdt:P131 ?loc .
?loc wdt:P31 ?nat .
?loc wdt:P131 ?loc2 .
FILTER (?nat = wd:Q55998242 || ?nat = wd:Q2826814 )
BIND(IF(?nat = wd:Q2826814,?loc2,?loc ) as ?location)
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en" }
}
GROUP BY ?locationLabel
LIMIT 1500
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?date")
v3("?item")
v5("?loc")
v6("?loc2")
v7("?location")
v1("?nat")
v4("?population"):::projected
v8("?totalPopulation")
a1((" "))
c6(["wd:Q204613"]):::iri
c9(["wd:Q29051383"]):::iri
c14(["bd:serviceParam"]):::iri
c16(["fr,en"]):::literal
c5(["wd:Q104782082"]):::iri
f0[["(?nat = 'wd:Q55998242' || ?nat = 'wd:Q2826814')"]]
f0 --> v1
f1[["?date >= '2020-07-01T00:00:00Z^^xsd:dateTime'"]]
f1 --> v2
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v3 --"p:direct/P31"--> c6
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v3 --"p:direct/P31"--> c5
end
union0r <== or ==> union0l
end
a1 --"p:statement/P1082"--> v4
a1 --"p:qualifier/P459"--> c9
a1 --"p:qualifier/P585"--> v2
v3 --"p:P1082"--> a1
v3 --"p:direct/P131"--> v5
v5 --"p:direct/P31"--> v1
v5 --"p:direct/P131"--> v6
bind2[/"if(?nat = 'wd:Q2826814',?loc2,?loc)"/]
v1 --o bind2
v6 --o bind2
v5 --o bind2
bind2 --as--o v7
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c14 --"wikibase:language"--> c16
end
bind4[/"sum(?population)"/]
v4 --o bind4
bind4 --as--o v8