query-a7f02f67473c3f2e537aed922b07ef90
title: Which organisms are known to contain stereoisomers of Beta-Sitosterol (Q121802)? SELECT ?taxon_name ?compound ?InChIKey WITH { SELECT ?queryKey ?srsearch ?filter WHERE { VALUES ?queryKey { "KZJWDPNRJALLNS-VJSFXXLFSA-N" # beta-sitosterol } BIND (CONCAT(substr($queryKey,1,14), " haswbstatement:P235") AS ?srsearch) BIND (CONCAT("^", substr($queryKey,1,14)) AS ?filter) } } AS %comps WITH { SELECT ?compound ?InChIKey WHERE { INCLUDE %comps SERVICE wikibase:mwapi { bd:serviceParam wikibase:endpoint "www.wikidata.org"; wikibase:api "Search"; mwapi:srsearch ?srsearch; mwapi:srlimit "max". ?compound wikibase:apiOutputItem mwapi:title. } ?compound wdt:P235 ?InChIKey . FILTER (REGEX(STR(?InChIKey), ?filter)) FILTER (?InChIKey != ?queryKey) } } AS %compounds WHERE { INCLUDE %compounds ?compound (wdt:P703/wdt:P225) ?taxon_name. } LIMIT 10000 title: Which organisms are known to contain stereoisomers of Beta-Sitosterol (Q121802)? SELECT ?taxon_name ?compound ?InChIKey WITH { SELECT ?queryKey ?srsearch ?filter WHERE { VALUES ?queryKey { "KZJWDPNRJALLNS-VJSFXXLFSA-N" # beta-sitosterol } BIND (CONCAT(substr($queryKey,1,14), " haswbstatement:P235") AS ?srsearch) BIND (CONCAT("^", substr($queryKey,1,14)) AS ?filter) } } AS %comps WITH { SELECT ?compound ?InChIKey WHERE { INCLUDE %comps SERVICE wikibase:mwapi { bd:serviceParam wikibase:endpoint "www.wikidata.org"; wikibase:api "Search"; mwapi:srsearch ?srsearch; mwapi:srlimit "max". ?compound wikibase:apiOutputItem mwapi:title. } ?compound wdt:P235 ?InChIKey . FILTER (REGEX(STR(?InChIKey), ?filter)) FILTER (?InChIKey != ?queryKey) } } AS %compounds WHERE { INCLUDE %compounds ?compound (wdt:P703/wdt:P225) ?taxon_name. } LIMIT 10000 title: Which organisms are known to contain stereoisomers of Beta-Sitosterol (Q121802)? SELECT ?taxon_name ?compound ?InChIKey WITH { SELECT ?queryKey ?srsearch ?filter WHERE { VALUES ?queryKey { "KZJWDPNRJALLNS-VJSFXXLFSA-N" # beta-sitosterol } BIND (CONCAT(substr($queryKey,1,14), " haswbstatement:P235") AS ?srsearch) BIND (CONCAT("^", substr($queryKey,1,14)) AS ?filter) } } AS %comps WITH { SELECT ?compound ?InChIKey WHERE { INCLUDE %comps SERVICE wikibase:mwapi { bd:serviceParam wikibase:endpoint "www.wikidata.org"; wikibase:api "Search"; mwapi:srsearch ?srsearch; mwapi:srlimit "max". ?compound wikibase:apiOutputItem mwapi:title. } ?compound wdt:P235 ?InChIKey . FILTER (REGEX(STR(?InChIKey), ?filter)) FILTER (?InChIKey != ?queryKey) } } AS %compounds WHERE { INCLUDE %compounds ?compound (wdt:P703/wdt:P225) ?taxon_name. } LIMIT 10000 title: Which organisms are known to contain stereoisomers of Beta-Sitosterol (Q121802)? SELECT ?taxon_name ?compound ?InChIKey WITH { SELECT ?queryKey ?srsearch ?filter WHERE { VALUES ?queryKey { "KZJWDPNRJALLNS-VJSFXXLFSA-N" # beta-sitosterol } BIND (CONCAT(substr($queryKey,1,14), " haswbstatement:P235") AS ?srsearch) BIND (CONCAT("^", substr($queryKey,1,14)) AS ?filter) } } AS %comps WITH { SELECT ?compound ?InChIKey WHERE { INCLUDE %comps SERVICE wikibase:mwapi { bd:serviceParam wikibase:endpoint "www.wikidata.org"; wikibase:api "Search"; mwapi:srsearch ?srsearch; mwapi:srlimit "max". ?compound wikibase:apiOutputItem mwapi:title. } ?compound wdt:P235 ?InChIKey . FILTER (REGEX(STR(?InChIKey), ?filter)) FILTER (?InChIKey != ?queryKey) } } AS %compounds WHERE { INCLUDE %compounds ?compound (wdt:P703/wdt:P225) ?taxon_name. } LIMIT 10000 title: Which organisms are known to contain stereoisomers of Beta-Sitosterol (Q121802)? SELECT ?taxon_name ?compound ?InChIKey WITH { SELECT ?queryKey ?srsearch ?filter WHERE { VALUES ?queryKey { "KZJWDPNRJALLNS-VJSFXXLFSA-N" # beta-sitosterol } BIND (CONCAT(substr($queryKey,1,14), " haswbstatement:P235") AS ?srsearch) BIND (CONCAT("^", substr($queryKey,1,14)) AS ?filter) } } AS %comps WITH { SELECT ?compound ?InChIKey WHERE { INCLUDE %comps SERVICE wikibase:mwapi { bd:serviceParam wikibase:endpoint "www.wikidata.org"; wikibase:api "Search"; mwapi:srsearch ?srsearch; mwapi:srlimit "max". ?compound wikibase:apiOutputItem mwapi:title. } ?compound wdt:P235 ?InChIKey . FILTER (REGEX(STR(?InChIKey), ?filter)) FILTER (?InChIKey != ?queryKey) } } AS %compounds WHERE { INCLUDE %compounds ?compound (wdt:P703/wdt:P225) ?taxon_name. } LIMIT 10000 title: Which organisms are known to contain stereoisomers of Beta-Sitosterol (Q121802)? SELECT ?taxon_name ?compound ?InChIKey WITH { SELECT ?queryKey ?srsearch ?filter WHERE { VALUES ?queryKey { "KZJWDPNRJALLNS-VJSFXXLFSA-N" # beta-sitosterol } BIND (CONCAT(substr($queryKey,1,14), " haswbstatement:P235") AS ?srsearch) BIND (CONCAT("^", substr($queryKey,1,14)) AS ?filter) } } AS %comps WITH { SELECT ?compound ?InChIKey WHERE { INCLUDE %comps SERVICE wikibase:mwapi { bd:serviceParam wikibase:endpoint "www.wikidata.org"; wikibase:api "Search"; mwapi:srsearch ?srsearch; mwapi:srlimit "max". ?compound wikibase:apiOutputItem mwapi:title. } ?compound wdt:P235 ?InChIKey . FILTER (REGEX(STR(?InChIKey), ?filter)) FILTER (?InChIKey != ?queryKey) } } AS %compounds WHERE { INCLUDE %compounds ?compound (wdt:P703/wdt:P225) ?taxon_name. } LIMIT 10000
Use at
- https://query.wikidata.org/sparql
PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title: Which organisms are known to contain stereoisomers of Beta-Sitosterol (Q121802)?
SELECT ?taxon_name ?compound ?InChIKey WHERE {
{
SELECT ?compound ?InChIKey WHERE {
{
SELECT ?queryKey ?srsearch ?filter WHERE {
VALUES ?queryKey {
"KZJWDPNRJALLNS-VJSFXXLFSA-N" # beta-sitosterol
}
BIND (CONCAT(substr($queryKey,1,14), " haswbstatement:P235") AS ?srsearch)
BIND (CONCAT("^", substr($queryKey,1,14)) AS ?filter)
}
} SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "www.wikidata.org";
wikibase:api "Search";
mwapi:srsearch ?srsearch;
mwapi:srlimit "max".
?compound wikibase:apiOutputItem mwapi:title.
}
?compound wdt:P235 ?InChIKey .
FILTER (REGEX(STR(?InChIKey), ?filter))
FILTER (?InChIKey != ?queryKey)
}
} ?compound (wdt:P703/wdt:P225) ?taxon_name.
}
LIMIT 10000
Query found at
- https://www.wikidata.org/wiki/Wikidata:WikiProject_Chemistry_Natural_products
- https://www.wikidata.org/wiki/Wikidata:WikiProject_Chemistry_Natural_products/de
- https://www.wikidata.org/wiki/Wikidata:WikiProject_Chemistry_Natural_products/en
- https://www.wikidata.org/wiki/Wikidata:WikiProject_Chemistry_Natural_products/fr
- https://www.wikidata.org/wiki/Wikidata:WikiProject_Chemistry_Natural_products/it
- https://www.wikidata.org/wiki/Wikidata:WikiProject_Chemistry_Natural_products/nl
- https://www.wikidata.org/wiki/Wikidata:WikiProject_Chemistry_Natural_products/ru