query-863f3a63c6727ebea82acef1676aa2d6
Data Gamer
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/>
SELECT ?item ?area ?population ?pit
WHERE
{
?item wdt:P31 wd:Q16739079 .
optional {?item p:P1082 [ps:P1082 ?population; pq:P585 ?pit; wikibase:rank wikibase:PreferredRank].}
optional {?item wdt:P2046 ?a .}
BIND(REPLACE(STR(?a),"\\.",",") AS ?area) .
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?a")
v5("?area"):::projected
v1("?item"):::projected
v3("?pit"):::projected
v2("?population"):::projected
a1((" "))
c6(["wikibase:PreferredRank"]):::iri
c2(["wd:Q16739079"]):::iri
v1 --"p:direct/P31"--> c2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
a1 -."p:statement/P1082".-> v2
a1 --"p:qualifier/P585"--> v3
a1 --"wikibase:rank"--> c6
v1 --"p:P1082"--> a1
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P2046".-> v4
end
bind0[/"replace(str(?a),'\.',',')"/]
v4 --o bind0
bind0 --as--o v5