query-9a8b897e25e9d1b21c7914a3e755cb43

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT distinct ?item ?itemLabel ?shortname  ?this
WHERE {    
  ?item (wdt:P31/wdt:P279*) wd:Q644371 .  # is airport
  ?item wdt:P1813 ?shortname .            # has shortname
  FILTER(LANG(?shortname)="en")
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". 
                           ?item rdfs:label ?itemLabel. }
  BIND(COALESCE(?shortname,?itemLabel) as ?this)
} 
ORDER BY ?itemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?item"):::projected v1("?itemLabel"):::projected v2("?shortname"):::projected v4("?this"):::projected a1((" ")) c7(["bd:serviceParam"]):::iri c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal c4(["wd:Q644371"]):::iri f0[["?shortname = 'en'"]] f0 --> v2 v3 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c4 v3 --"wdt:P1813"--> v2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 v3 --"rdfs:label"--> v1 end bind1[/"?shortname?itemLabel"/] v2 --o bind1 v1 --o bind1 bind1 --as--o v4