query-3e6761fe439bf40cf957a32e217b7a9f

rq turtle/ttl

Misidentified subtribe

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?item ?taxonName ?parentTaxonName WHERE {
   ?item wdt:P225 ?taxonName .
   ?item wdt:P105 wd:Q2455704 . # subfamily (-inae)
   ?item wdt:P171/wdt:P225 ?parentTaxonName .
   ?item wdt:P171/wdt:P105 ?parentTaxonRank .
   FILTER(sameTerm(?parentTaxonRank, wd:Q227936)) # tribe   
}
ORDER BY ASC(?parentTaxonName) ASC(?taxonName)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?item"):::projected v1("?parentTaxonName"):::projected v3("?parentTaxonRank") v2("?taxonName"):::projected a1((" ")) a2((" ")) c4(["wd:Q2455704"]):::iri f0[["sameterm(?parentTaxonRank,'wd:Q227936')"]] f0 --> v3 v4 --"wdt:P225"--> v2 v4 --"wdt:P105"--> c4 v4 --"wdt:P171"--> a1 a1 --"wdt:P225"--> v1 v4 --"wdt:P171"--> a2 a2 --"wdt:P105"--> v3