query-bbfe449baec2bd27731504fa6caf83e3

rq turtle/ttl

Subspecies autonyms with author

Use at

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?item ?taxonName WHERE {
   ?item p:P105/ps:P105 wd:Q68947 . # subspecies
   ?item p:P225/ps:P225 ?taxonName .
   ?item p:P225/pq:P405 [] .
   FILTER(REGEX(?taxonName, "\\b(\\w+) subsp. (\\1)\\b")) #todo replace w+ 
}
ORDER BY ASC(?taxonName)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?item"):::projected v1("?taxonName"):::projected a4((" ")) a1((" ")) a2((" ")) a3((" ")) c4(["wd:Q68947"]):::iri f0[["regex(?taxonName,'\b(\w+) subsp. (\1)\b')"]] f0 --> v1 v2 --"p:P105"--> a1 a1 --"p:statement/P105"--> c4 v2 --"p:P225"--> a2 a2 --"p:statement/P225"--> v1 v2 --"p:P225"--> a3 a3 --"p:qualifier/P405"--> a4