query-71a378efbe6c611a6362a3d874565d73

rq turtle/ttl

Vérifier les aéroports d'un pays et supprimer doublons, nombreux s'ils disposent pas de code IATA/ICAO

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 WHERE {
  ?airport (wdt:P31/wdt:P279*) wd:Q1248784.
  ?airport ?range wd:Q142.
  filter not exists {?airport wdt:P239 ?icao .}               # there is no ICAO value
  filter not exists {?airport wdt:P238 ?iata .}               # there is no IATA value
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,fr,de,kk". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?airport"):::projected v2("?iata") v3("?icao") v4("?range") a1((" ")) c5(["wd:Q1248784"]):::iri c8(["bd:serviceParam"]):::iri c6(["wd:Q142"]):::iri c10(["#91;AUTO_LANGUAGE#93;,en,fr,de,kk"]):::literal f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"wdt:P238"--> e0v2 e0v1("?airport"):::projected e0v2("?iata"):::projected end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c1 f0 --> v2 v1 --"wdt:P238"--> v2 f1[["not "]] subgraph f1e1["Exists Clause"] e1v1 --"wdt:P239"--> e1v2 e1v1("?airport"):::projected e1v2("?icao"):::projected end f1--EXISTS--> f1e1 f1 --> v1 f1 --> c2 f1 --> v3 v1 --"wdt:P239"--> v3 v1 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c5 v1 -->v4--> c6 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end