query-477d803ca39a07aae9d222d3f7f2c682

rq turtle/ttl

Rank and parent rank are the same

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?item ?taxonName ?taxonRank ?parentTaxonRank WHERE {
   #BIND(wd:Q7432 AS ?taxonRank) # species
   ?item wdt:P225 ?taxonName .
   ?item wdt:P105 ?taxonRank .
   ?item wdt:P171/wdt:P105 ?parentTaxonRank .
   FILTER(sameTerm(?parentTaxonRank, ?taxonRank))
}
ORDER BY ASC(?taxonName)

Query found at

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