Difference between revisions of "Workdocumentation 2025-03-09"
Jump to navigation
Jump to search
(Created page with "<source lang='sparql'> # Railway stations in a country # 2025-03-09 SELECT ?station ?code ?label ?url ?loc WHERE { ?station wdt:P296 ?code; wdt:P31 wd:Q55488. # R...") |
(No difference)
|
Revision as of 18:03, 9 March 2025
# 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)