query-1c07491ab54fdd91b036bdce74fe81bb
Query not showing the good elementsHello
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#>
PREFIX wdno: <http://www.wikidata.org/prop/novalue/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT DISTINCT ?airport ?airportLabel (SAMPLE(?coord) AS ?coord) ?ICAO ?IATA (SAMPLE(?Local_Code) AS ?Local_Code) WHERE {
?airport (wdt:P31/wdt:P279*) wd:Q62447.
?airport wdt:P17 wd:Q23334.
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,fr,[AUTO_LANGUAGE]". }
OPTIONAL { ?airport wdt:P625 ?coord. }
OPTIONAL { ?airport wdt:P239 ?ICAO. }
OPTIONAL { ?airport wdt:P238 ?IATA. }
}
GROUP BY ?airport ?airportLabel ?ICAO ?IATA
ORDER BY ?coord
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?IATA"):::projected
v3("?ICAO"):::projected
v6("?Local_Code"):::projected
v2("?airport"):::projected
v6("?coord"):::projected
a1((" "))
c7(["bd:serviceParam"]):::iri
c9(["en,fr,#91;AUTO_LANGUAGE#93;"]):::literal
c3(["wd:Q62447"]):::iri
c5(["wd:Q23334"]):::iri
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
v2 --"wdt:P17"--> c5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P625".-> v6
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P239".-> v3
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P238".-> v4
end
bind2[/"sample(?coord)"/]
v6 --o bind2
bind2 --as--o v6
bind3[/"sample(?Local_Code)"/]
v6 --o bind3
bind3 --as--o v6