query-11ea4fb736fd006254ffb4c73fec465e
All German aerodromes (via located in the administrative territorial entity (P131)) [1]
Use at
- https://query.wikidata.org/sparql
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX v: <http://www.wikidata.org/prop/statement/>
PREFIX q: <http://www.wikidata.org/prop/qualifier/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?airport ?icao ?airportLabel WHERE {
?subdivision wdt:P279+ wd:Q387917 . # all subdivision types of Germany
?location wdt:P31 ?subdivision . # all locations in Germany
?airportType wdt:P279* wd:Q62447 . # all types of aerodromes
?airport wdt:P31 ?airportType . # all aerodromes
?airport wdt:P131 ?location . # all aerodromes in Germany
OPTIONAL { ?airport wdt:P239 ?icao }
SERVICE wikibase:label {
bd:serviceParam wikibase:language "de" .
}
} ORDER BY ?airportLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?airport"):::projected
v1("?airportLabel"):::projected
v4("?airportType")
v6("?icao"):::projected
v3("?location")
v2("?subdivision")
c2(["wd:Q387917"]):::iri
c10(["de"]):::literal
c8(["bd:serviceParam"]):::iri
c4(["wd:Q62447"]):::iri
v2 --"p:direct/P279"--> c2
v3 --"p:direct/P31"--> v2
v4 --"p:direct/P279"--> c4
v5 --"p:direct/P31"--> v4
v5 --"p:direct/P131"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:direct/P239".-> v6
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end