query-f8c8fcfa94a6dbcad3d2f010e40bc03e
Every 'instance of' X which has more than one 'instance of' statement and a list of values of these 'instance of' statamentsDon't know if it's even possible, but maybe it is: optionally: with a number of items that has such statement and the result of the query should be a list of such values from #2 statement(P31)instance of that has another (Q11173)chemical compound (P31)instance of Every ): (Q11173)chemical compound (P31)instance of has (beside (Q191924)D-methamphetamine As an example: (Q8386)drug (P31)instance of (Q44909815)DL-methamphetamine (P31)instance of (Q12140)medication (P31)instance of And I need a list in which I would have: : 50000; but that can be done using another simpler query).(Q12140)medication (optionally with a number, e.g. (Q11173)chemical compound (P31)instance of ... every other 'instance of' value from every other item with (Q8386)drug (Q44909815)DL-methamphetamine (Q12140)medication 22:37, 10 March 2020 (UTC) )talk( Wostr. (Q11173)chemical compound I want to know which other 'instance of' values are present in items classified as : Wostr@ First one, the list of compound with other instance of value :
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
select ?item {
?item wdt:P31 wd:Q11173 filter exists {?item wdt:P31 ?class filter (?class != wd:Q11173) }
}