query-78419a634482f9a70bec86b8c2752372
Query of chemicals having one InChIKey and the associated English article if available
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
SELECT * WHERE {
?compound wdt:P31 wd:Q11173 ;
wdt:P235 ?inchikey.
OPTIONAL { ?compound wdt:P231 ?cas } .
OPTIONAL { ?article schema:about ?compound; schema:name ?title; schema:isPartOf <https://en.wikipedia.org/> }.
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?article"):::projected
v3("?cas"):::projected
v1("?compound"):::projected
v2("?inchikey"):::projected
v5("?title"):::projected
c8([https://en.wikipedia.org/]):::iri
c2(["wd:Q11173"]):::iri
v1 --"wdt:P31"--> c2
v1 --"wdt:P235"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P231".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."schema:about".-> v1
v4 --"schema:name"--> v5
v4 --"schema:isPartOf"--> c8
end