query-f97012e97766f835e10af68b67ae0adc

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 ?item ?itemLabel ?next ?nextLabel ?next_stm
{
  ?item wdt:P31 wd:Q14562709 .
  ?item p:P197 ?next_stm .
  ?next_stm ps:P197 ?next .
  ?next_stm pq:P81 ?line1 .
  ?next_stm pq:P81 ?line2 .
  FILTER (STR(?line1) < STR(?line2))
  ?next_stm pq:P5051 ?towards1 .
  ?next_stm pq:P5051 ?towards2 .
  FILTER (STR(?towards1) < STR(?towards2))  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?item"):::projected v3("?line1") v4("?line2") v7("?next"):::projected v6("?next_stm"):::projected v1("?towards1") v2("?towards2") c2(["wd:Q14562709"]):::iri c8(["bd:serviceParam"]):::iri c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["str(?towards1) < str(?towards2)"]] f0 --> v1 f0 --> v2 f1[["str(?line1) < str(?line2)"]] f1 --> v3 f1 --> v4 v5 --"p:direct/P31"--> c2 v5 --"p:P197"--> v6 v6 --"p:statement/P197"--> v7 v6 --"p:qualifier/P81"--> v3 v6 --"p:qualifier/P81"--> v4 v6 --"p:qualifier/P5051"--> v1 v6 --"p:qualifier/P5051"--> v2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end