query-f69c55d0865c332d2655e4933878fcb5
Bouzinac(Q15079663)rapid transit railway line (P559)terminus
Use at
- https://query.wikidata.org/sparql
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 ?metroline ?metrolineLabel ?endpoints
WHERE
{
{
SELECT ?metroline (COUNT(?endpoint) AS ?endpoints)
WHERE
{
?metroline wdt:P31 wd:Q15079663 .
?metroline wdt:P559 ?endpoint .
}
GROUP BY ?metroline
HAVING (?endpoints > 2)
}
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;
v3("?endpoint")
v4("?endpoints"):::projected
v2("?metroline"):::projected
c6(["bd:serviceParam"]):::iri
c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c3(["wd:Q15079663"]):::iri
f0[["?endpoints > '2^^xsd:integer'"]]
f0 --> v4
v2 --"wdt:P31"--> c3
v2 --"wdt:P559"--> v3
bind2[/"count(?endpoint)"/]
v3 --o bind2
bind2 --as--o v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end