query-0442e66468e54ca72ab3521c87487725

rq turtle/ttl

Protonyms with duplicate names

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?taxonname (count(?item) as ?count)
WHERE
{
     ?item wdt:P171+ wd:Q980146. 
     ?item p:P225 ?name.
     ?name  ps:P225 ?taxonname.
     ?item p:P2868 ?statement0.
     ?statement0 ps:P2868 wd:Q14192851.
} group by ?taxonname having( count(?item) > 1)
order by DESC(?count)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?_anon_42b5416610844a34809f33a099ae9de180217") v7("?count") v2("?item"):::projected v3("?name") v5("?statement0") v4("?taxonname"):::projected a1((" ")) c8(["wd:Q14192851"]):::iri c3(["wd:Q980146"]):::iri f0[[" > '1^^xsd:integer'"]] f0 --> a1 v2 --"p:direct/P171"--> c3 v2 --"p:P225"--> v3 v3 --"p:statement/P225"--> v4 v2 --"p:P2868"--> v5 v5 --"p:statement/P2868"--> c8 bind3[/"count(?item)"/] v2 --o bind3 bind3 --as--o v6 bind4[/"count(?item)"/] v2 --o bind4 bind4 --as--o v7