query-15092037cb4171fffa3dfd74b57b0400
Chemical compounds and their properties SELECT ?compound ?smiles ?mass ?chemical_formula # (COUNT (?compound) AS ?count) WHERE { ?compound wdt:P31 wd:Q11173. ?compound wdt:P233 ?smiles. OPTIONAL { ?compound wdt:P2067 ?mass. } OPTIONAL { ?compound wdt:P274 ?chemical_formula. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } } #LIMIT 1000
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Chemical compounds and their properties
SELECT ?compound ?smiles ?mass ?chemical_formula # (COUNT (?compound) AS ?count)
WHERE
{
?compound wdt:P31 wd:Q11173.
?compound wdt:P233 ?smiles.
OPTIONAL { ?compound wdt:P2067 ?mass. }
OPTIONAL { ?compound wdt:P274 ?chemical_formula. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } }
#LIMIT 1000
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?chemical_formula"):::projected
v1("?compound"):::projected
v3("?mass"):::projected
v2("?smiles"):::projected
c7(["bd:serviceParam"]):::iri
c2(["wd:Q11173"]):::iri
c9(["en"]):::literal
v1 --"wdt:P31"--> c2
v1 --"wdt:P233"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P2067".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P274".-> v4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end