query-6cd6ef97dd8d64874f4b5746433abdbc
Look after a/some specific IATA code(s)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT distinct ?item ?itemLabel ?natureLabel WHERE {
{?item wdt:P238 ?IATA
VALUES ?IATA { "AMS" "BOO" }.} #item has a P238 value
OPTIONAL { ?item wdt:P31 ?nature. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" } . #this bit gets labels for Qid values
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?IATA")
v1("?item"):::projected
v3("?nature")
c4(["bd:serviceParam"]):::iri
c6(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v1 --"wdt:P238"--> v3
bind0[/VALUES ?IATA/]
bind0-->v3
bind00(["AMS"])
bind00 --> bind0
bind01(["BOO"])
bind01 --> bind0
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P31".-> v3
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
end