Hi, I've been reading the docs for a little bit in trying to understand if the following type of query is possible but havent been able to make it work.
Let's say I have data with a sample rate of every 1 second. I'd like to compute the daily median for a few months of data, but i'd only like to consider samples between a certain time time of day window, say between 12:01pm and 6pm for the sake of this example. Without the time window, I would assume something like the following should work: SELECT median(foo) FROM bar GROUP BY time(1d) However, adding the time window makes it not so clear to me. I thought maybe I could add a WHERE clause where I modulus divide time by 3600 (60*60) to get an hour (and then check WHERE time mod 3600 >= 12 AND WHERE time mod 3600 < 18 referring to noon and 6pm) but that would require a modulus division function which looks like it does not yet exist. <https://docs.influxdata.com/influxdb/v1.1/query_language/math_operators/#logical-operators-are-unsupported> Any thoughts on how to do this and whether it is possible? The only method I have come up with so far is having a python script that would go and tag each sample with a number between 0 .. 60*60*24=86400 based on the time of day, but that would be a bit of a kludge in my opinion. Ideas would be much appreciated! Mike -- Remember to include the version number! --- You received this message because you are subscribed to the Google Groups "InfluxData" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/influxdb. To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/abe4567a-5f19-44cd-863a-5019f12b060e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
