Skip to content

Instantly share code, notes, and snippets.

@davidsbatista
Created February 25, 2022 12:52
Show Gist options
  • Save davidsbatista/b9dc19b762b0f16f1ea754124f5a6024 to your computer and use it in GitHub Desktop.
Save davidsbatista/b9dc19b762b0f16f1ea754124f5a6024 to your computer and use it in GitHub Desktop.
Get train station, ibnr, and train station type associated to each IBNR
SELECT DISTINCT ?station_label ?ibnr_stmt ?x ?ibnr_type_stmnt ?label WHERE
{
wd:Q376589 rdfs:label ?station_label.
wd:Q376589 p:P954 ?ibnr_stmt.
?ibnr_stmt ps:P954 ?x.
?ibnr_stmt pq:P518 ?ibnr_type_stmnt.
?ibnr_type_stmnt rdfs:label ?label.
FILTER(lang(?station_label) = 'de')
FILTER(lang(?label) = 'de')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment