query-3eda5ad436e9b9d33c6de4b68ee10259

rq turtle/ttl

in special cases the place of the type strain may be taken Species by a description, preserved specimen, or an illustration (see Rule 18a(1)) SELECT DISTINCT ?item ?taxonName ?nomenclaturalType ?rankOfNomenclaturalTypeLabel ?lpsnUrl WHERE { VALUES ?taxonRank {wd:Q7432 wd:Q68947} . ?item wdt:P225 ?taxonName . ?item wdt:P105 ?taxonRank . OPTIONAL {?item wdt:P427/wdt:P225 ?nomenclaturalType} . OPTIONAL {?item wdt:P427/wdt:P105 ?rankOfnomenclaturalType} . OPTIONAL {?item wdt:P1991 ?lpsnUrl} . ?item (wdt:P171)* ?higherParent . ?higherParent wdt:P944 wd:Q743780 . FILTER(!bound(?nomenclaturalType)|| !sameTerm(?rankOfNomenclaturalType, wd:Q855769)) SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". } } ORDER BY ASC(?taxonName)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# in special cases the place of the type strain may be taken Species by a description, preserved specimen, or an illustration (see Rule 18a(1))
SELECT DISTINCT ?item ?taxonName ?nomenclaturalType ?rankOfNomenclaturalTypeLabel ?lpsnUrl WHERE {
      VALUES ?taxonRank {wd:Q7432 wd:Q68947} .
      ?item wdt:P225 ?taxonName .
      ?item wdt:P105 ?taxonRank .
      OPTIONAL {?item wdt:P427/wdt:P225 ?nomenclaturalType} .
      OPTIONAL {?item wdt:P427/wdt:P105 ?rankOfnomenclaturalType} .
      OPTIONAL {?item wdt:P1991 ?lpsnUrl} .
      ?item (wdt:P171)* ?higherParent .
      ?higherParent wdt:P944 wd:Q743780 .
      FILTER(!bound(?nomenclaturalType)|| !sameTerm(?rankOfNomenclaturalType, wd:Q855769))
      SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}
ORDER BY ASC(?taxonName)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v8("?higherParent") v5("?item"):::projected v7("?lpsnUrl"):::projected v2("?nomenclaturalType"):::projected v3("?rankOfNomenclaturalType") v6("?rankOfnomenclaturalType") v1("?taxonName"):::projected v4("?taxonRank") a1((" ")) a2((" ")) c10(["bd:serviceParam"]):::iri c8(["wd:Q743780"]):::iri c12(["#91;AUTO_LANGUAGE#93;"]):::literal f0[["(not bound(?nomenclaturalType) || not sameterm(?rankOfNomenclaturalType,'wd:Q855769'))"]] f0 --> v2 f0 --> v3 bind1[/VALUES ?taxonRank/] bind1-->v4 bind10(["wd:Q7432"]) bind10 --> bind1 bind11(["wd:Q68947"]) bind11 --> bind1 v5 --"wdt:P225"--> v1 v5 --"wdt:P105"--> v4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v5 -."wdt:P427".-> a1 a1 --"wdt:P225"--> v2 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v5 -."wdt:P427".-> a2 a2 --"wdt:P105"--> v6 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v5 -."wdt:P1991".-> v7 end v5 --"wdt:P171"--> v8 v8 --"wdt:P944"--> c8 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 end