query-a6f93ea4e671fb5cbcb1776c2fcd7490

rq turtle/ttl

Cultivars with most ascendants

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 ?rosa ?rosaLabel (COUNT(DISTINCT ?parent) as ?ct)
WHERE
{
    ?rosa wdt:P1531+ ?parent ; wdt:P31 wd:Q26817508
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?rosa ?rosaLabel 
ORDER BY DESC(?ct) ?rosa

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?ct") v3("?parent"):::projected v2("?rosa"):::projected c5(["bd:serviceParam"]):::iri c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal c3(["wd:Q26817508"]):::iri v2 --"wdt:P1531"--> v3 v2 --"wdt:P31"--> c3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end bind1[/"count(?parent)"/] v3 --o bind1 bind1 --as--o v4