query-6d00c848260412e829b50f40875298e8
Propertiescountry (P17)instance of (P31)subclass of (P279)station code (P296)IBNR ID (P954)UIC station code (P722)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?bahnhofsnr ?ibnr ?uic
WHERE
{
?item wdt:P17 wd:Q183.
?item wdt:P31/wdt:P279* wd:Q55488.
OPTIONAL {?item wdt:P296 ?bahnhofsnr}.
OPTIONAL {?item wdt:P954 ?ibnr}.
OPTIONAL {?item wdt:P722 ?uic}.
SERVICE wikibase:label { bd:serviceParam wikibase:language "de,en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?bahnhofsnr"):::projected
v3("?ibnr"):::projected
v1("?item"):::projected
v4("?uic"):::projected
a1((" "))
c10(["bd:serviceParam"]):::iri
c5(["wd:Q55488"]):::iri
c2(["wd:Q183"]):::iri
c12(["de,en"]):::literal
v1 --"wdt:P17"--> c2
v1 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P296".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P954".-> v3
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P722".-> v4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end