query-a51346b7654ee9331d1bbe27f614d95b
Type species
Use at
- https://query.wikidata.org/sparql
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#>
SELECT DISTINCT ?item ?taxonName ?nomenclaturalType ?rankOfNomenclaturalTypeLabel WHERE {
VALUES ?taxonRank {wd:Q34740} .
?item wdt:P225 ?taxonName .
?item wdt:P105 ?taxonRank .
OPTIONAL {?item wdt:P427/wdt:P225 ?nomenclaturalType} .
OPTIONAL {?item wdt:P427/wdt:P105 ?rankOfnomenclaturalType} .
?item (wdt:P171)* ?higherParent .
?higherParent wdt:P944 wd:Q14920640 .
#FILTER(!bound(?nomenclaturalType)|| !sameTerm(?rankOfNomenclaturalType, wd:Q855769))
#FILTER(bound(?nomenclaturalType))
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;
v6("?higherParent")
v3("?item"):::projected
v4("?nomenclaturalType"):::projected
v5("?rankOfnomenclaturalType")
v1("?taxonName"):::projected
v2("?taxonRank")
a1((" "))
a2((" "))
c8(["bd:serviceParam"]):::iri
c10(["#91;AUTO_LANGUAGE#93;"]):::literal
c6(["wd:Q14920640"]):::iri
bind0[/VALUES ?taxonRank/]
bind0-->v2
bind00(["wd:Q34740"])
bind00 --> bind0
v3 --"wdt:P225"--> v1
v3 --"wdt:P105"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P427".-> a1
a1 --"wdt:P225"--> v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P427".-> a2
a2 --"wdt:P105"--> v5
end
v3 --"wdt:P171"--> v6
v6 --"wdt:P944"--> c6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end