query-37c3f069983d7e9486e24cf79b9caac2

rq turtle/ttl

PropertiesBugGuide taxon ID (P2464)parent taxon (P171)taxon rank (P105) Test if taxon in Arthropoda treeThis ID should be only used for Arthropoda taxons. The query below is supposed to test for it:

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?item ?BugGuideID 
{
    ?item wdt:P2464 ?BugGuideID .      # has BugGuideID 
    ?item wdt:P171  ?pItem .           # has parent item
    MINUS {?item wdt:P171+ wd:Q1360. } # exclude items in Arthropoda tree
    MINUS {?item wdt:P105 wd:Q38348. } # exclude Arthropoda (Q1360) itself
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?BugGuideID"):::projected v1("?item"):::projected v3("?pItem") c5(["wd:Q38348"]):::iri c3(["wd:Q1360"]):::iri v1 --"wdt:P2464"--> v2 v1 --"wdt:P171"--> v3 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P171"--> c3 end subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P105"--> c5 end