A set of SPARQL examples that are used in LOTUS
Taxa containing Beta-Sitosterol (Q121802).
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
#title: Taxa containing Beta-Sitosterol (Q121802).
SELECT DISTINCT ?taxon ?taxon_name WHERE {
VALUES ?compound {
wd:Q121802 # You can remove the Qxxxxxx and hit Ctrl+space, type the first letters and it should autocomplete
}
?compound wdt:P703 ?taxon. # Found in taxon
?taxon wdt:P225 ?taxon_name. # Get scientific name of the taxon
}
LIMIT 10000
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?compound")
v2("?taxon"):::projected
v3("?taxon_name"):::projected
bind0[/VALUES ?compound/]
bind0-->v1
bind00(["wd:Q121802"])
bind00 --> bind0
v1 --"wdt:P703"--> v2
v2 --"wdt:P225"--> v3