Closed Adafede closed 8 months ago
There is currently a conflict. Could you rebase to current master?
A perhaps more readable version:
SELECT
(xsd:integer(?count_) AS ?count)
(CONCAT("Total chemicals with ", ?description_) AS ?description)
WHERE {
BIND("haswbstatement:P31=Q113145171|P31=Q59199015" AS ?constraint)
VALUES (?description_ ?property_query_term) {
("or without stereochemistry" "")
("fully defined stereochemistry" "P31=Q113145171")
("undefined stereochemistry" "P31=Q59199015")
("CAS registry number" "P231")
("canonical SMILES" "P233")
("InChI" "P234")
("InChIKey" "P235")
("chemical formula" "P274")
("ChEMBL ID" "P592")
("PubChem ID" "P662")
("ChEBI ID" "P683")
("found in taxon" "P703")
("isomeric SMILES" "P2017")
("crystal structure" "haswbstatement:P3636|P11375")
("mass spectrum" "haswbstatement:P4964|P6689")
("NMR spectrum" "haswbstatement:P5219|P9405")
# hacky way to get quantity properties.
("pKa" "linksto:Property:P1117")
("mass" "linksto:Property:P2067")
("melting point" "linksto:Property:P2101")
("boiling point" "linksto:Property:P2102")
}
BIND(CONCAT(?property_query_term, " ", ?constraint) AS ?search_query)
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "www.wikidata.org" ;
wikibase:api "Search" ;
wikibase:limit "once" ;
mwapi:srsearch ?search_query;
mwapi:srlimit "1".
?count_ wikibase:apiOutput "//searchinfo[1]/@totalhits".
}
}
ORDER BY DESC(?count)
Sorry, made a bit of a mess. Should be good now
Fixes #2377
Description
Caveats
If you make changes to the Python code
Testing
Please describe the tests that you ran to verify your changes. Provide instructions, so we can reproduce. Please also list any relevant details for your test configuration.
None
Checklist