query-da8fae147dcbe9d657a6eb2d3d7964d5
TODO
Use at
- https://query.wikidata.org/sparql
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 ?ICAO ?IATA ?FAA_USA ?6 {
?airport (wdt:P31/wdt:P279*) wd:Q62447.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
OPTIONAL { ?airport wdt:P239 ?ICAO. }
OPTIONAL { ?airport wdt:P238 ?IATA. }
?airport wdt:P240 ?FAA_USA.
OPTIONAL { ?airport wdt:P5699 ?Code_Transport_Canada. }
?airport wdt:P5746 ?DGAC.
OPTIONAL { ?airport wdt:P5851 ?russ. }
bind(if(bound(?FAA_USA),?FAA_USA,"") as ?1)
bind(if(bound(?Code_Transport_Canada),?Code_Transport_Canada,"") as ?2)
bind(if(bound(?DGAC),?DGAC,"") as ?3)
bind(if(bound(?russ),?russ,"") as ?4)
bind(if(bound(?FAArg),?FAArg,"") as ?5)
bind(concat(?1,"; ",?2,"; ",?3,"; ",?4,"; ",?5) as ?6)
}
limit 10
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v8("?1")
v9("?2")
v10("?3")
v11("?4")
v12("?5")
v13("?6"):::projected
v5("?Code_Transport_Canada")
v6("?DGAC")
v4("?FAA_USA"):::projected
v3("?IATA"):::projected
v2("?ICAO"):::projected
v1("?airport"):::projected
v7("?russ")
a1((" "))
c3(["wd:Q62447"]):::iri
c5(["bd:serviceParam"]):::iri
c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v1 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P239".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P238".-> v3
end
v1 --"wdt:P240"--> v4
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P5699".-> v5
end
v1 --"wdt:P5746"--> v6
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P5851".-> v7
end
bind0[/"if(bound(?FAA_USA),?FAA_USA,'')"/]
v4 --o bind0
bind0 --as--o v8
bind1[/"if(bound(?Code_Transport_Canada),?Code_Transport_Canada,'')"/]
v5 --o bind1
bind1 --as--o v9
bind2[/"if(bound(?DGAC),?DGAC,'')"/]
v6 --o bind2
bind2 --as--o v10
bind3[/"if(bound(?russ),?russ,'')"/]
v7 --o bind3
bind3 --as--o v11
bind4[/"if(bound(?FAArg),?FAArg,'')"/]
null --o bind4
bind4 --as--o v12
bind5[/"concat(?1,'; ',?2,'; ',?3,'; ',?4,'; ',?5)"/]
v8 --o bind5
v9 --o bind5
v10 --o bind5
v11 --o bind5
v12 --o bind5
bind5 --as--o v13