A set of SPARQL examples that are used in LOTUS
OTT IDs of taxa containing compound(s).
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
#title: OTT IDs of taxa containing compound(s).
SELECT ?taxon ?taxon_id_ott WHERE {
  ?structure p:P235 [];
    p:P703 [
      ps:P703 ?taxon].
  ?taxon wdt:P9157 ?taxon_id_ott.
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?structure")
  v2("?taxon"):::projected 
  v3("?taxon_id_ott"):::projected 
  a1((" "))
  a2((" "))
  v1 --"p:P235"-->  a1
  a2 --"p:statement/P703"-->  v2
  v1 --"p:P703"-->  a2
  v2 --"p:direct/P9157"-->  v3