query-b035f0ccec08240e41428182a3f7de1d

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 ?item ?itemLabel ?iata ?icao ?countryLabel where {
   {select ?item (count(distinct ?country) as ?cc)  WHERE {
  ?item wdt:P31/wdt:P279* wd:Q1248784.
  ?item wdt:P17 ?country.
  } group by ?item }  filter (?cc >1)
  optional {?item wdt:P17 ?country.}
  optional {?item wdt:P238 ?iata .}
  optional {?item wdt:P239 ?icao .}
  minus {?item wdt:P31 wd:Q1311670.}
  minus {?item wdt:P31 wd:Q7373622.}
  minus {?item wdt:P31 wd:Q502074.}
  minus {?item wdt:P576 ?date.}   
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
} order by ?itemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?cc") v4("?country") v7("?date") v5("?iata"):::projected v6("?icao"):::projected v3("?item"):::projected v1("?itemLabel"):::projected a1((" ")) c9(["wd:Q7373622"]):::iri c15(["en"]):::literal c4(["wd:Q1248784"]):::iri c13(["bd:serviceParam"]):::iri c8(["wd:Q1311670"]):::iri c10(["wd:Q502074"]):::iri f0[["?cc > '1^^xsd:integer'"]] f0 --> v5 v3 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c4 v3 --"wdt:P17"--> v4 bind2[/"count(?country)"/] v4 --o bind2 bind2 --as--o v5 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P17".-> v4 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P238".-> v5 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P239".-> v6 end subgraph minus3["MINUS"] style minus3 stroke-width:6px,fill:pink,stroke:red; v3 --"wdt:P31"--> c8 end subgraph minus4["MINUS"] style minus4 stroke-width:6px,fill:pink,stroke:red; v3 --"wdt:P31"--> c9 end subgraph minus5["MINUS"] style minus5 stroke-width:6px,fill:pink,stroke:red; v3 --"wdt:P31"--> c10 end subgraph minus6["MINUS"] style minus6 stroke-width:6px,fill:pink,stroke:red; v3 --"wdt:P576"--> v7 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c13 --"wikibase:language"--> c15 end