query-0c2793774625d0e82c57cdd7a2eb86d2

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 bd: <http://www.bigdata.com/rdf#>
SELECT ?line1 ?line1Label ?line2 ?line2Label ?part_of_line ?part_of_lineLabel
WHERE
{
  ?line1 wdt:P31 wd:Q15795637 .
  ?line2 wdt:P31 wd:Q15795637 .
  FILTER (?line1 != ?line2)
  ?line1 wdt:P527 ?part_of_line .
  ?line2 wdt:P527 ?part_of_line .
  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; v1("?line1"):::projected v2("?line2"):::projected v3("?part_of_line"):::projected c5(["bd:serviceParam"]):::iri c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal c2(["wd:Q15795637"]):::iri f0[["?line1 != ?line2"]] f0 --> v1 f0 --> v2 v1 --"wdt:P31"--> c2 v2 --"wdt:P31"--> c2 v1 --"wdt:P527"--> v3 v2 --"wdt:P527"--> v3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end