Workdocumentation 2025-03-09
Jump to navigation
Jump to search
# Railway stations in a country
# 2025-03-09
SELECT ?station ?code ?label ?url ?loc WHERE {
?station wdt:P296 ?code;
wdt:P31 wd:Q55488. # Railway station
?station rdfs:label ?label.
FILTER(LANG(?label) = "en") # Ensures we only get Spanish labels
OPTIONAL { ?station wdt:P973 ?url. } # Optional "described at URL"
?station wdt:P625 ?loc. # Coordinate location
?station wdt:P131* wd:Q142. # France (Q142) Portugal (Q45) / Spain (Q29)
}
ORDER BY DESC(?loc)