query-3958b6f94f97a515ee6504658c903935

rq turtle/ttl

All German aerodromes (via country (P17)) [2]

Use at

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 {
    ?airportType wdt:P279* wd:Q62447 .
    ?airport wdt:P31 ?airportType .
    ?airport wdt:P17 wd:Q183 .
    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; v3("?airport"):::projected v1("?airportLabel"):::projected v2("?airportType") v4("?icao"):::projected c10(["de"]):::literal c8(["bd:serviceParam"]):::iri c5(["wd:Q183"]):::iri c2(["wd:Q62447"]):::iri v2 --"p:direct/P279"--> c2 v3 --"p:direct/P31"--> v2 v3 --"p:direct/P17"--> c5 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:direct/P239".-> v4 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end