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...") |
|||
| Line 13: | Line 13: | ||
ORDER BY DESC(?loc) | ORDER BY DESC(?loc) | ||
</source> | </source> | ||
| + | |||
| + | https://www.wikidata.org/wiki/Q21296564 | ||
Latest revision as of 18:04, 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)