query-60d84a445253bafe77ef036dd329a177

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 bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?airport ?airportLabel (SAMPLE(?coord) AS ?coord) ?ICAO ?IATA WHERE {
  VALUES ?country { wd:Q23334 wd:Q31354462 }
  ?airport (wdt:P31/wdt:P279*) wd:Q62447.
  ?airport wdt:P17 ?country .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,fr,[AUTO_LANGUAGE]". }
  OPTIONAL { ?airport wdt:P625 ?coord. }
  OPTIONAL { ?airport wdt:P239 ?ICAO. }
  OPTIONAL { ?airport wdt:P238 ?IATA. }
}
GROUP BY ?airport ?airportLabel ?ICAO ?IATA

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?IATA"):::projected v4("?ICAO"):::projected v2("?airport"):::projected v6("?coord"):::projected v1("?country") a1((" ")) c6(["bd:serviceParam"]):::iri c8(["en,fr,#91;AUTO_LANGUAGE#93;"]):::literal c3(["wd:Q62447"]):::iri bind0[/VALUES ?country/] bind0-->v1 bind00(["wd:Q23334"]) bind00 --> bind0 bind01(["wd:Q31354462"]) bind01 --> bind0 v2 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c3 v2 --"wdt:P17"--> v1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P625".-> v6 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P239".-> v4 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P238".-> v5 end bind2[/"sample(?coord)"/] v6 --o bind2 bind2 --as--o v6