query-3b37de2aa67df88d7e102b84db08423f
702 (auxiliary) WFM Dictionary No.
Use at
- https://query.wikidata.org/sparql
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/>
#Swiss municipality populations, by date of Wikidata's information. Attribution to https://stackoverflow.com/questions/45210878/how-to-project-additional-variables-from-sparql-aggregates
#defaultView:ScatterChart
SELECT ?year ?popWD WHERE {
?item wdt:P31 wd:Q70208.
?item p:P1082 ?popWDStatement.
?popWDStatement ps:P1082 ?popWD;
pq:P585 ?timeWD.
FILTER NOT EXISTS {
?item wdt:P31 wd:Q70208.
?item p:P1082 ?popWDStatement_.
?popWDStatement_ ps:P1082 ?popWD_;
pq:P585 ?timeWD_.
FILTER (?timeWD_ > ?timeWD)}
BIND(YEAR(?timeWD) AS ?year)
}
GROUP BY ?year ?popWD
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?item")
v7("?popWD"):::projected
v6("?popWDStatement")
v4("?popWDStatement_")
v5("?popWD_")
v2("?timeWD")
v1("?timeWD_")
v8("?year"):::projected
c2(["wd:Q70208"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0f0[["?timeWD_ > ?timeWD"]]
e0f0 --> e0v1
e0f0 --> e0v2
e0v3 --"p:direct/P31"--> e0c2
e0v3 --"p:P1082"--> e0v4
e0v4 --"p:statement/P1082"--> e0v5
e0v4 --"p:qualifier/P585"--> e0v1
e0v3("?item"):::projected
e0v4("?popWDStatement_"):::projected
e0v5("?popWD_"):::projected
e0v2("?timeWD"):::projected
e0v1("?timeWD_"):::projected
e0c2(["wd:Q70208"]):::iri
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> v2
f0 --> v3
f0 --> c1
f0 --> c2
f0 --> c3
f0 --> v4
f0 --> c4
f0 --> v5
f0 --> c5
f1[["?timeWD_ > ?timeWD"]]
f1 --> v1
f1 --> v2
v3 --"p:direct/P31"--> c2
v3 --"p:P1082"--> v4
v4 --"p:statement/P1082"--> v5
v4 --"p:qualifier/P585"--> v1
v3 --"p:direct/P31"--> c2
v3 --"p:P1082"--> v6
v6 --"p:statement/P1082"--> v7
v6 --"p:qualifier/P585"--> v2
bind2[/"year-from-dateTime(?timeWD)"/]
v2 --o bind2
bind2 --as--o v8