I have to request data taking 24h period prior to the latest timestamp.
Currently I achieve this by making 2 queries like this:
SELECT wind FROM weather WHERE source='dallas' ORDER BY DESC LIMIT 1
"series": [
{
"name": "weather",
"columns": [
"time",
"wind"
],
"values": [
[
"2018-07-13T16:32:42.48338873Z",
27.3
]
]
}
]
And second query using found latest [timestamp - 1d]:
SELECT wind FROM weather WHERE source='dallas' and time>='2018-07-12T16:32:42.48338873Z' ORDER BY ASC
Is it possible achieve this using only one query?
I tried sub-queries without success (I am new to InfluxDb).
Influxdb-Version 1.7.6