Workdocumentation 2025-03-09

From BITPlan cr Wiki
Revision as of 19:03, 9 March 2025 by Wf (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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)