query-4e1e464db1d7b2ae92da6cd89eeb7651
TODO
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 ?opened
WHERE
{
?item wdt:P31 wd:Q928830. # it's a metro station
?item wdt:P361 wd:Q68646 # part of the U-bahn
OPTIONAL { ?item wdt:P1619 ?opened . } # it may have an opening date
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],de". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item"):::projected
v2("?opened"):::projected
c2(["wd:Q928830"]):::iri
c9(["#91;AUTO_LANGUAGE#93;,de"]):::literal
c7(["bd:serviceParam"]):::iri
c4(["wd:Q68646"]):::iri
v1 --"wdt:P31"--> c2
v1 --"wdt:P361"--> c4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P1619".-> v2
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end