I'm new to SPARQL and I'm trying to get the boiling points of a chemical from Wikidata. However, when I try this query on ethanol as an example, I get two numbers, one being the boiling point in Fahrenheit and the other in Celsius, but without being able to tell which is which.
I'd ideally like to filter to only return the Celsius value, but I'd also be happy if I could just get the unit for each value and then I can sort it out later (that's what I've tried so far, as a first step).
I've tried this:
SELECT
?temperature ?temperatureLabel ?unitLabel
WHERE {
wd:Q153 p:P2102 ?statement.
?statement ps:P2102 [
wikibase:quantityAmount ?temperature;
wikibase:quantityUnit ?unit;
].
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
and this:
SELECT
?temperature ?temperatureLabel ?unitLabel
WHERE {
wd:Q153 p:P2102 ?statement.
?statement ps:P2102 ?temperature.
?temperature wikibase:quantityUnit ?unit.
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
...amongst other things, but receive no matching results. I've been banging my head against the wall with this for hours now, would really appreciate any help.