query-3822750bf3066b423315d2aa22e4127c
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 p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT distinct ?item ?itemLabel (sample(?geo) as ?geo) WHERE {
?item p:P31/p:P279* ?statement .
?statement ps:P31 wd:Q42744322.
optional { ?item wdt:P625 ?geo . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} group by ?item ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?geo"):::projected
v1("?item"):::projected
v2("?statement")
a1((" "))
c7(["bd:serviceParam"]):::iri
c4(["wd:Q42744322"]):::iri
c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v1 --"p:P31"--> a1
a1 --"p:P279"--> v2
v2 --"p:statement/P31"--> c4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P625".-> v4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end
bind1[/"sample(?geo)"/]
v4 --o bind1
bind1 --as--o v4