Last active
September 11, 2022 10:11
-
-
Save egonw/192f0f0281859897febb7286345af235 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT ?smiles | |
| WHERE { | |
| SERVICE wikibase:mwapi { | |
| bd:serviceParam wikibase:endpoint "www.wikidata.org"; | |
| wikibase:api "Search"; | |
| mwapi:srsearch "haswbstatement:P235 -haswbstatement:P274"; | |
| mwapi:srlimit "max". | |
| ?cmp wikibase:apiOutputItem mwapi:title. | |
| } | |
| OPTIONAL { ?cmp wdt:P2017 ?isoSmi } | |
| OPTIONAL { ?cmp wdt:P233 ?canSmi } | |
| BIND (COALESCE(?isoSmi, ?canSmi) AS ?smiles) | |
| FILTER (BOUND(?smiles)) | |
| MINUS { ?cmp wdt:P31/wdt:P279* wd:Q25276 } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment