query-232614ee2de218d634e20ed6297f1dfe
Canadian stations closed in 2017 and 2018
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
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#>
# Canadian stations closed in 2017 and 2018
#defaultView:Map
SELECT ?item ?itemLabel ?coord WHERE {
?item (wdt:P31/wdt:P279*) wd:Q190107.
?item wdt:P127 wd:Q349450.
?item wdt:P3999 ?closureDate .
FILTER (?closureDate = "2017-01-01T00:00:00Z"^^xsd:dateTime ||
?closureDate = "2018-01-01T00:00:00Z"^^xsd:dateTime) .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
OPTIONAL { ?item wdt:P625 ?coord. }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?closureDate")
v3("?coord"):::projected
v2("?item"):::projected
a1((" "))
c5(["wd:Q190107"]):::iri
c7(["wd:Q349450"]):::iri
c10(["bd:serviceParam"]):::iri
c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["(?closureDate = '2017-01-01T00:00:00Z^^xsd:dateTime' || ?closureDate = '2018-01-01T00:00:00Z^^xsd:dateTime')"]]
f0 --> v1
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c5
v2 --"wdt:P127"--> c7
v2 --"wdt:P3999"--> v1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P625".-> v3
end