query-2eb91a0404dbff31c683d7a6d2d84b4d

rq turtle/ttl

Y shaped subways, other query

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:ImageGrid
SELECT ?metroline ?metrolineLabel ?endpoints ?carte_d_itin_raire WHERE {
  {
    SELECT ?metroline (COUNT(?endpoint_statement) AS ?endpoints) WHERE {
      ?metroline wdt:P31 wd:Q105967897;
        p:P559 ?endpoint_statement.
      ?endpoint_statement rdf:type wikibase:BestRank.
      FILTER(NOT EXISTS { ?endpoint_statement pq:P582 _:b2. })
    }
    GROUP BY ?metroline
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
   ?metroline wdt:P15 ?carte_d_itin_raire.
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?carte_d_itin_raire"):::projected v1("?endpoint_statement") v3("?endpoints"):::projected v2("?metroline"):::projected a1((" ")) c8(["bd:serviceParam"]):::iri c3(["wd:Q105967897"]):::iri c6(["wikibase:BestRank"]):::iri c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"p:qualifier/P582"--> e0a1 e0v1("?endpoint_statement"):::projected e0a1((" ")):::projected end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c1 f0 --> a1 v1 --"p:qualifier/P582"--> a1 v2 --"p:direct/P31"--> c3 v2 --"p:P559"--> v1 v1 --"a"--> c6 bind2[/"count(?endpoint_statement)"/] v1 --o bind2 bind2 --as--o v3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end v2 --"p:direct/P15"--> v4