query-23215ab758c9589fa6af18a495c731b5
Map of aerodromes in a country
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#>
#Airfields
#Airfields
#defaultView:Map
SELECT ?item ?itemLabel (sample(?coordinate_location) as ?coord) WHERE {
?item (p:P31/ps:P31/wdt:P279*) wd:Q62447.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE], en". }
?item wdt:P17 wd:Q155.
MINUS { ?item wdt:P576 _:b2. } # remove items with P576 (dissolved, abolished or demolished) as a main property
OPTIONAL { ?item wdt:P625 ?coordinate_location. }
} group by ?item ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?coord")
v2("?coordinate_location"):::projected
v1("?item"):::projected
a3((" "))
a1((" "))
a2((" "))
c6(["bd:serviceParam"]):::iri
c8(["#91;AUTO_LANGUAGE#93;, en"]):::literal
c4(["wd:Q62447"]):::iri
c10(["wd:Q155"]):::iri
v1 --"p:P31"--> a1
a1 --"p:statement/P31"--> a2
a2 --"p:direct/P279"--> c4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end
v1 --"p:direct/P17"--> c10
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
v1 --"p:direct/P576"--> a3
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P625".-> v2
end
bind2[/"sample(?coordinate_location)"/]
v2 --o bind2
bind2 --as--o v3