query-0029158bf6dd3d51ee22b7d9e89beed6
Patronage of airports in a countryHello, I wonder why this query isn't working out?
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?airport ?airportLabel ?number
?ICAO ?IATA
(SAMPLE(?Localite) AS ?Localite)
?LocaliteLabel
(SAMPLE(?localisation_administrative) AS ?localisation_administrative)
?localisation_administrativeLabel WHERE {
?airport (wdt:P31/wdt:P279*) wd:Q62447.
?airport wdt:P17 wd:Q142.
?airport p:P3872 ?statement .
?statement pq:P585 ?time .
?statement ps:P3872 ?number .
filter(year(?time)=2017)
MINUS { ?airport wdt:P576 _:b2. }
MINUS { ?airport wdt:P582 _:b3. }
MINUS { ?airport (wdt:P31/wdt:P279*) wd:Q1311670. }
MINUS { ?airport (wdt:P31/wdt:P279*) wd:Q7373622. }
MINUS { ?airport (wdt:P31/wdt:P279*) wd:Q502074. }
MINUS { ?airport (wdt:P31/wdt:P279*) wd:Q44665966. }
MINUS { ?airport (wdt:P31/wdt:P279*) wd:Q782667. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,[AUTO_LANGUAGE]". }
OPTIONAL { ?airport wdt:P239 ?ICAO. }
OPTIONAL { ?airport wdt:P238 ?IATA. }
OPTIONAL { ?airport wdt:P931 ?Localite. }
OPTIONAL { ?airport wdt:P131 ?localisation_administrative. }
}
GROUP BY ?airport ?airportLabel ?ICAO ?IATA ?Localite ?LocaliteLabel ?localisation_administrative ?localisation_administrativeLabel ?time
ORDER BY desc(?number)