query-af86259fc2440c34a8ee4098637b2a07

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?station ?stationLabel ?nextStation ?nextStationLabel WHERE {
  ?station wdt:P31 wd:Q55488 ; wdt:P197 ?nextStation .
  MINUS { ?station p:P31 [ ps:P31 wd:Q55488 ; pq:P582 ?endDate ] . }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
limit 5

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?endDate") v2("?nextStation"):::projected v1("?station"):::projected a1((" ")) c8(["bd:serviceParam"]):::iri c2(["wd:Q55488"]):::iri c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal v1 --"p:direct/P31"--> c2 v1 --"p:direct/P197"--> v2 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; a1 --"p:statement/P31"--> c2 a1 --"p:qualifier/P582"--> v3 v1 --"p:P31"--> a1 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end