query-83fa44b42b621fe470e3fac4ee6b8788

rq turtle/ttl

Si tu fais une carte, pas besoin de OPTIONAL (qui demande toute les aéroports avec et sans coordonnées mais les coordonnées sont nécessaires pour faire une carte).

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map
SELECT ?aeroport ?aeroportLabel ?coords WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  ?aeroport wdt:P625 ?coords .
  ?aeroport p:P31 [wikibase:rank ?rank ; ps:P31  wd:Q94993988 ] . 
    values ?rank { wikibase:PreferredRank wikibase:NormalRank }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?aeroport"):::projected v2("?coords"):::projected v4("?rank") a1((" ")) c2(["bd:serviceParam"]):::iri c8(["wd:Q94993988"]):::iri c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c2 --"wikibase:language"--> c4 end v1 --"p:direct/P625"--> v2 a1 --"wikibase:rank"--> v4 a1 --"p:statement/P31"--> c8 v1 --"p:P31"--> a1 bind0[/VALUES ?rank/] bind0-->v4 bind00(["wikibase:PreferredRank"]) bind00 --> bind0 bind01(["wikibase:NormalRank"]) bind01 --> bind0