query-b3af8dc6d258e3ae8dcc4d870a1eac84
Check wiki airport element having neither IATA nor ICAO nor FAA LID
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wdno: <http://www.wikidata.org/prop/novalue/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?airport ?airportlabel ?pays ?paysLabel WHERE {
?airport (wdt:P31/wdt:P279*) wd:Q62447.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,fr,de,kk". }
FILTER(NOT EXISTS { ?airport wdt:P239| wdt:P238|wdt:P240| wdt:P5699| wdt:P5746| wdt:P5851|wdt:P6120 ?code. })
FILTER NOT EXISTS { ?airport p:P239 [rdf:type wdno:P239].} #we do not want the ?item if ICAO has a <no value>
MINUS {?airport wdt:P576 [].} # remove items with P576 (dissolved, abolished or demolished) as a main property
MINUS {?airport wdt:P582 [].} # remove items with P582 (end date) as a main property
MINUS {
?airport (wdt:P31/(wdt:P279*)) ?thing.
VALUES ?thing {
wd:Q695850 wd:Q2265915 wd:Q1311670 wd:Q7373622 wd:Q782667 wd:Q502074 wd:Q44665966 wd:Q2071567
wd:Q3631092 wd:Q4930096 wd:Q3631092
}
}
?airport wdt:P17 ?pays.
} order by ?paysLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?airport"):::projected
v3("?code")
v5("?pays"):::projected
v1("?paysLabel"):::projected
v5("?thing")
a3((" "))
a4((" "))
a2((" "))
a1((" "))
a5((" "))
c2(["p:novalue/P239"]):::iri
c13(["wd:Q62447"]):::iri
c17(["#91;AUTO_LANGUAGE#93;,en,fr,de,kk"]):::literal
c15(["bd:serviceParam"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0a1 --"a"--> e0c2
e0v1 --"p:P239"--> e0a1
e0v1("?airport"):::projected
e0a1((" ")):::projected
e0c2(["p:novalue/P239"]):::iri
end
f0--EXISTS--> f0e0
f0 --> a1
f0 --> c1
f0 --> c2
f0 --> v2
f0 --> c3
a1 --"a"--> c2
v2 --"p:P239"--> a1
f1[["not "]]
subgraph f1e1["Exists Clause"]
subgraph unione10[" Union "]
subgraph unione10l[" "]
style unione10l fill:#abf,stroke-dasharray: 3 3;
subgraph unione11[" Union "]
subgraph unione11l[" "]
style unione11l fill:#abf,stroke-dasharray: 3 3;
subgraph unione12[" Union "]
subgraph unione12l[" "]
style unione12l fill:#abf,stroke-dasharray: 3 3;
subgraph unione13[" Union "]
subgraph unione13l[" "]
style unione13l fill:#abf,stroke-dasharray: 3 3;
subgraph unione14[" Union "]
subgraph unione14l[" "]
style unione14l fill:#abf,stroke-dasharray: 3 3;
subgraph unione15[" Union "]
subgraph unione15l[" "]
style unione15l fill:#abf,stroke-dasharray: 3 3;
e1v1 --"p:direct/P6120"--> e1v2
end
subgraph unione15r[" "]
style unione15r fill:#abf,stroke-dasharray: 3 3;
e1v1 --"p:direct/P5851"--> e1v2
end
unione15r <== or ==> unione15l
end
end
subgraph unione14r[" "]
style unione14r fill:#abf,stroke-dasharray: 3 3;
e1v1 --"p:direct/P5746"--> e1v2
end
unione14r <== or ==> unione14l
end
end
subgraph unione13r[" "]
style unione13r fill:#abf,stroke-dasharray: 3 3;
e1v1 --"p:direct/P5699"--> e1v2
end
unione13r <== or ==> unione13l
end
end
subgraph unione12r[" "]
style unione12r fill:#abf,stroke-dasharray: 3 3;
e1v1 --"p:direct/P240"--> e1v2
end
unione12r <== or ==> unione12l
end
end
subgraph unione11r[" "]
style unione11r fill:#abf,stroke-dasharray: 3 3;
e1v1 --"p:direct/P238"--> e1v2
end
unione11r <== or ==> unione11l
end
end
subgraph unione10r[" "]
style unione10r fill:#abf,stroke-dasharray: 3 3;
e1v1 --"p:direct/P239"--> e1v2
end
unione10r <== or ==> unione10l
end
e1v1("?airport"):::projected
e1v2("?code"):::projected
end
f1--EXISTS--> f1e1
f1 --> v2
f1 --> c4
f1 --> v3
f1 --> c5
f1 --> c6
f1 --> c7
f1 --> c8
f1 --> c9
f1 --> c10
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
subgraph union3[" Union "]
subgraph union3l[" "]
style union3l fill:#abf,stroke-dasharray: 3 3;
subgraph union4[" Union "]
subgraph union4l[" "]
style union4l fill:#abf,stroke-dasharray: 3 3;
subgraph union5[" Union "]
subgraph union5l[" "]
style union5l fill:#abf,stroke-dasharray: 3 3;
v2 --"p:direct/P6120"--> v3
end
subgraph union5r[" "]
style union5r fill:#abf,stroke-dasharray: 3 3;
v2 --"p:direct/P5851"--> v3
end
union5r <== or ==> union5l
end
end
subgraph union4r[" "]
style union4r fill:#abf,stroke-dasharray: 3 3;
v2 --"p:direct/P5746"--> v3
end
union4r <== or ==> union4l
end
end
subgraph union3r[" "]
style union3r fill:#abf,stroke-dasharray: 3 3;
v2 --"p:direct/P5699"--> v3
end
union3r <== or ==> union3l
end
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
v2 --"p:direct/P240"--> v3
end
union2r <== or ==> union2l
end
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v2 --"p:direct/P238"--> v3
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"p:direct/P239"--> v3
end
union0r <== or ==> union0l
end
v2 --"p:direct/P31"--> a2
a2 --"p:direct/P279"--> c13
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c15 --"wikibase:language"--> c17
end
subgraph minus2["MINUS"]
style minus2 stroke-width:6px,fill:pink,stroke:red;
v2 --"p:direct/P576"--> a3
end
subgraph minus3["MINUS"]
style minus3 stroke-width:6px,fill:pink,stroke:red;
v2 --"p:direct/P582"--> a4
end
subgraph minus4["MINUS"]
style minus4 stroke-width:6px,fill:pink,stroke:red;
v2 --"p:direct/P31"--> a5
a5 --"p:direct/P279"--> v5
bind5[/VALUES ?thing/]
bind5-->v5
bind50(["wd:Q695850"])
bind50 --> bind5
bind51(["wd:Q2265915"])
bind51 --> bind5
bind52(["wd:Q1311670"])
bind52 --> bind5
bind53(["wd:Q7373622"])
bind53 --> bind5
bind54(["wd:Q782667"])
bind54 --> bind5
bind55(["wd:Q502074"])
bind55 --> bind5
bind56(["wd:Q44665966"])
bind56 --> bind5
bind57(["wd:Q2071567"])
bind57 --> bind5
bind58(["wd:Q3631092"])
bind58 --> bind5
bind59(["wd:Q4930096"])
bind59 --> bind5
bind510(["wd:Q3631092"])
bind510 --> bind5
end
v2 --"p:direct/P17"--> v5