query-b1909fa39296815a8a18d88cc5c99760
List of IATA airport codes with geo coords, city, country, continentHi all, I'm new to SPARQL, I'm trying to create a query to have: Continent Country City Geographical coordinates IATA airport codeWhat I did with the query editor:
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 ?codice_aeroportuale_IATA ?coordinate_geografiche ?PaeseLabel ?continenteLabel WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
OPTIONAL { ?item wdt:P238 ?codice_aeroportuale_IATA. }
OPTIONAL { ?item wdt:P625 ?coordinate_geografiche. }
OPTIONAL { ?item wdt:P17 ?Paese. }
OPTIONAL { ?item wdt:P30 ?continente. }
}
LIMIT 10
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?Paese")
v2("?codice_aeroportuale_IATA"):::projected
v5("?continente")
v3("?coordinate_geografiche"):::projected
v1("?item")
c2(["bd:serviceParam"]):::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
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P238".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P625".-> v3
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P17".-> v4
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P30".-> v5
end