query-a6acff66350a07f9c357265621cba378
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX gas: <http://www.bigdata.com/rdf/gas#>
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/>
SELECT ?depth WHERE {
VALUES ?to {wd:Q49870}
SERVICE gas:service {
gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.SSSP" .
gas:program gas:linkType wdt:P197 .
gas:program gas:in wd:Q1948428 .
gas:program gas:out ?station .
MINUS { ?station p:P31 [ ps:P31 wd:Q55488 ; pq:P582 ?endDate ] . }
gas:program gas:out1 ?depth .
gas:program gas:maxIterations 20 .
}
FILTER (?station = ?to)
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?depth"):::projected
v3("?endDate")
v1("?station")
v3("?to")
a1((" "))
c2(["gas:program"]):::iri
c8(["wd:Q1948428"]):::iri
c4(["com.bigdata.rdf.graph.analytics.SSSP"]):::literal
c6(["p:direct/P197"]):::iri
c11(["wd:Q55488"]):::iri
c16(["20^^xsd:integer"]):::literal
f0[["?station = ?to"]]
f0 --> v1
f0 --> v3
bind1[/VALUES ?to/]
bind1-->v3
bind10(["wd:Q49870"])
bind10 --> bind1
subgraph s1["http://www.bigdata.com/rdf/gas#service"]
style s1 stroke-width:4px;
c2 --"gas:gasClass"--> c4
c2 --"gas:linkType"--> c6
c2 --"gas:in"--> c8
c2 --"gas:out"--> v1
subgraph minus2["MINUS"]
style minus2 stroke-width:6px,fill:pink,stroke:red;
a1 --"p:statement/P31"--> c11
a1 --"p:qualifier/P582"--> v3
v1 --"p:P31"--> a1
end
c2 --"gas:out1"--> v4
c2 --"gas:maxIterations"--> c16
end