query-00b50a9b97bd9ad65a244af57c9ed630
title: Which Zephyranthes (Q191364) spp. lack compounds known from at least two species in the genus? PREFIX target: http://www.wikidata.org/entity/Q191364 # Zephyranthes SELECT DISTINCT ?compound ?compoundLabel ?taxon_with_compound ?another_taxon_with_compound ?taxon_without_compound WITH { SELECT DISTINCT ?compound ?taxon_YES_1 ?taxon_YES_2 WHERE { ?compound wdt:P703 ?taxon_YES_1 . ?compound wdt:P703 ?taxon_YES_2 . ?taxon_YES_1 wdt:P171 target: . ?taxon_YES_2 wdt:P171 target: . FILTER (?taxon_YES_2 != ?taxon_YES_1) } } AS %taxa_with_compound WITH { SELECT DISTINCT ?taxon_NO ?compound WHERE { INCLUDE %taxa_with_compound ?taxon_NO wdt:P171 target: . FILTER (?taxon_YES_1 != ?taxon_NO) } } AS %taxon_without_compond WHERE { INCLUDE %taxa_with_compound INCLUDE %taxon_without_compond FILTER NOT EXISTS { ?compound wdt:P703 ?taxon_NO .} VALUES ?classes { wd:Q113145171 wd:Q59199015 } ?taxon_YES_1 wdt:P225 ?taxon_with_compound . ?taxon_YES_2 wdt:P225 ?another_taxon_with_compound . ?taxon_NO wdt:P225 ?taxon_without_compound . ?compound (wdt:P31/wdt:P279) ?classes . ?compound rdfs:label ?compoundLabel. FILTER(LANG(?compoundLabel) = "en"). } LIMIT 10000 title: Which Zephyranthes (Q191364) spp. lack compounds known from at least two species in the genus? PREFIX target: http://www.wikidata.org/entity/Q191364 # Zephyranthes SELECT DISTINCT ?compound ?compoundLabel ?taxon_with_compound ?another_taxon_with_compound ?taxon_without_compound WITH { SELECT DISTINCT ?compound ?taxon_YES_1 ?taxon_YES_2 WHERE { ?compound wdt:P703 ?taxon_YES_1 . ?compound wdt:P703 ?taxon_YES_2 . ?taxon_YES_1 wdt:P171 target: . ?taxon_YES_2 wdt:P171 target: . FILTER (?taxon_YES_2 != ?taxon_YES_1) } } AS %taxa_with_compound WITH { SELECT DISTINCT ?taxon_NO ?compound WHERE { INCLUDE %taxa_with_compound ?taxon_NO wdt:P171 target: . FILTER (?taxon_YES_1 != ?taxon_NO) } } AS %taxon_without_compond WHERE { INCLUDE %taxa_with_compound INCLUDE %taxon_without_compond FILTER NOT EXISTS { ?compound wdt:P703 ?taxon_NO .} VALUES ?classes { wd:Q113145171 wd:Q59199015 } ?taxon_YES_1 wdt:P225 ?taxon_with_compound . ?taxon_YES_2 wdt:P225 ?another_taxon_with_compound . ?taxon_NO wdt:P225 ?taxon_without_compound . ?compound (wdt:P31/wdt:P279) ?classes . ?compound rdfs:label ?compoundLabel. FILTER(LANG(?compoundLabel) = "en"). } LIMIT 10000 title: Which Zephyranthes (Q191364) spp. lack compounds known from at least two species in the genus? PREFIX target: http://www.wikidata.org/entity/Q191364 # Zephyranthes SELECT DISTINCT ?compound ?compoundLabel ?taxon_with_compound ?another_taxon_with_compound ?taxon_without_compound WITH { SELECT DISTINCT ?compound ?taxon_YES_1 ?taxon_YES_2 WHERE { ?compound wdt:P703 ?taxon_YES_1 . ?compound wdt:P703 ?taxon_YES_2 . ?taxon_YES_1 wdt:P171 target: . ?taxon_YES_2 wdt:P171 target: . FILTER (?taxon_YES_2 != ?taxon_YES_1) } } AS %taxa_with_compound WITH { SELECT DISTINCT ?taxon_NO ?compound WHERE { INCLUDE %taxa_with_compound ?taxon_NO wdt:P171 target: . FILTER (?taxon_YES_1 != ?taxon_NO) } } AS %taxon_without_compond WHERE { INCLUDE %taxa_with_compound INCLUDE %taxon_without_compond FILTER NOT EXISTS { ?compound wdt:P703 ?taxon_NO .} VALUES ?classes { wd:Q113145171 wd:Q59199015 } ?taxon_YES_1 wdt:P225 ?taxon_with_compound . ?taxon_YES_2 wdt:P225 ?another_taxon_with_compound . ?taxon_NO wdt:P225 ?taxon_without_compound . ?compound (wdt:P31/wdt:P279) ?classes . ?compound rdfs:label ?compoundLabel. FILTER(LANG(?compoundLabel) = "en"). } LIMIT 10000 title: Which Zephyranthes (Q191364) spp. lack compounds known from at least two species in the genus? PREFIX target: http://www.wikidata.org/entity/Q191364 # Zephyranthes SELECT DISTINCT ?compound ?compoundLabel ?taxon_with_compound ?another_taxon_with_compound ?taxon_without_compound WITH { SELECT DISTINCT ?compound ?taxon_YES_1 ?taxon_YES_2 WHERE { ?compound wdt:P703 ?taxon_YES_1 . ?compound wdt:P703 ?taxon_YES_2 . ?taxon_YES_1 wdt:P171 target: . ?taxon_YES_2 wdt:P171 target: . FILTER (?taxon_YES_2 != ?taxon_YES_1) } } AS %taxa_with_compound WITH { SELECT DISTINCT ?taxon_NO ?compound WHERE { INCLUDE %taxa_with_compound ?taxon_NO wdt:P171 target: . FILTER (?taxon_YES_1 != ?taxon_NO) } } AS %taxon_without_compond WHERE { INCLUDE %taxa_with_compound INCLUDE %taxon_without_compond FILTER NOT EXISTS { ?compound wdt:P703 ?taxon_NO .} VALUES ?classes { wd:Q113145171 wd:Q59199015 } ?taxon_YES_1 wdt:P225 ?taxon_with_compound . ?taxon_YES_2 wdt:P225 ?another_taxon_with_compound . ?taxon_NO wdt:P225 ?taxon_without_compound . ?compound (wdt:P31/wdt:P279) ?classes . ?compound rdfs:label ?compoundLabel. FILTER(LANG(?compoundLabel) = "en"). } LIMIT 10000 title: Which Zephyranthes (Q191364) spp. lack compounds known from at least two species in the genus? PREFIX target: http://www.wikidata.org/entity/Q191364 # Zephyranthes SELECT DISTINCT ?compound ?compoundLabel ?taxon_with_compound ?another_taxon_with_compound ?taxon_without_compound WITH { SELECT DISTINCT ?compound ?taxon_YES_1 ?taxon_YES_2 WHERE { ?compound wdt:P703 ?taxon_YES_1 . ?compound wdt:P703 ?taxon_YES_2 . ?taxon_YES_1 wdt:P171 target: . ?taxon_YES_2 wdt:P171 target: . FILTER (?taxon_YES_2 != ?taxon_YES_1) } } AS %taxa_with_compound WITH { SELECT DISTINCT ?taxon_NO ?compound WHERE { INCLUDE %taxa_with_compound ?taxon_NO wdt:P171 target: . FILTER (?taxon_YES_1 != ?taxon_NO) } } AS %taxon_without_compond WHERE { INCLUDE %taxa_with_compound INCLUDE %taxon_without_compond FILTER NOT EXISTS { ?compound wdt:P703 ?taxon_NO .} VALUES ?classes { wd:Q113145171 wd:Q59199015 } ?taxon_YES_1 wdt:P225 ?taxon_with_compound . ?taxon_YES_2 wdt:P225 ?another_taxon_with_compound . ?taxon_NO wdt:P225 ?taxon_without_compound . ?compound (wdt:P31/wdt:P279) ?classes . ?compound rdfs:label ?compoundLabel. FILTER(LANG(?compoundLabel) = "en"). } LIMIT 10000 title: Which Zephyranthes (Q191364) spp. lack compounds known from at least two species in the genus? PREFIX target: http://www.wikidata.org/entity/Q191364 # Zephyranthes SELECT DISTINCT ?compound ?compoundLabel ?taxon_with_compound ?another_taxon_with_compound ?taxon_without_compound WITH { SELECT DISTINCT ?compound ?taxon_YES_1 ?taxon_YES_2 WHERE { ?compound wdt:P703 ?taxon_YES_1 . ?compound wdt:P703 ?taxon_YES_2 . ?taxon_YES_1 wdt:P171 target: . ?taxon_YES_2 wdt:P171 target: . FILTER (?taxon_YES_2 != ?taxon_YES_1) } } AS %taxa_with_compound WITH { SELECT DISTINCT ?taxon_NO ?compound WHERE { INCLUDE %taxa_with_compound ?taxon_NO wdt:P171 target: . FILTER (?taxon_YES_1 != ?taxon_NO) } } AS %taxon_without_compond WHERE { INCLUDE %taxa_with_compound INCLUDE %taxon_without_compond FILTER NOT EXISTS { ?compound wdt:P703 ?taxon_NO .} VALUES ?classes { wd:Q113145171 wd:Q59199015 } ?taxon_YES_1 wdt:P225 ?taxon_with_compound . ?taxon_YES_2 wdt:P225 ?another_taxon_with_compound . ?taxon_NO wdt:P225 ?taxon_without_compound . ?compound (wdt:P31/wdt:P279) ?classes . ?compound rdfs:label ?compoundLabel. FILTER(LANG(?compoundLabel) = "en"). } LIMIT 10000
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
#title: Which Zephyranthes (Q191364) spp. lack compounds known from at least two species in the genus?
PREFIX target: <http://www.wikidata.org/entity/Q191364> # Zephyranthes
SELECT DISTINCT ?compound ?compoundLabel ?taxon_with_compound ?another_taxon_with_compound ?taxon_without_compound
WHERE {
{
SELECT DISTINCT ?compound ?taxon_YES_1 ?taxon_YES_2
WHERE {
?compound wdt:P703 ?taxon_YES_1 .
?compound wdt:P703 ?taxon_YES_2 .
?taxon_YES_1 wdt:P171 target: .
?taxon_YES_2 wdt:P171 target: .
FILTER (?taxon_YES_2 != ?taxon_YES_1)
}
}
{
SELECT DISTINCT ?taxon_NO ?compound
WHERE {
{
SELECT DISTINCT ?compound ?taxon_YES_1 ?taxon_YES_2
WHERE {
?compound wdt:P703 ?taxon_YES_1 .
?compound wdt:P703 ?taxon_YES_2 .
?taxon_YES_1 wdt:P171 target: .
?taxon_YES_2 wdt:P171 target: .
FILTER (?taxon_YES_2 != ?taxon_YES_1)
}
} ?taxon_NO wdt:P171 target: .
FILTER (?taxon_YES_1 != ?taxon_NO)
}
} FILTER NOT EXISTS { ?compound wdt:P703 ?taxon_NO .}
VALUES ?classes {
wd:Q113145171
wd:Q59199015
}
?taxon_YES_1 wdt:P225 ?taxon_with_compound .
?taxon_YES_2 wdt:P225 ?another_taxon_with_compound .
?taxon_NO wdt:P225 ?taxon_without_compound .
?compound (wdt:P31*/wdt:P279*) ?classes .
?compound rdfs:label ?compoundLabel.
FILTER(LANG(?compoundLabel) = "en").
}
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