query-835ddd8de41015fa1485f506e188cd1a
Need help for queryHello, I need help to build a query: I want to extract all chemicals having an InChIKey with the CAS value if this value is available and the name of the English Wikipedia article if an article exists in WP:en. Here is the start of the query: TODO UNION of instance of: chemical compound (Q11173), InChIKey
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT * WHERE {
?compound wdt:P31 wd:Q11173 ;
wdt:P235 ?inchikey
}
Query found at
- https://www.wikidata.org/wiki/Wikidata:Project_chat/Archive/2019/04
- https://www.wikidata.org/wiki/Wikidata:WikiProject_Chemistry/ChemID
- https://www.wikidata.org/wiki/Wikidata:WikiProject_Chemistry/Tools
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?compound"):::projected
v2("?inchikey"):::projected
c2(["wd:Q11173"]):::iri
v1 --"wdt:P31"--> c2
v1 --"wdt:P235"--> v2