Time in response is different if I do math in the SELECT clause

#1

Hello,

I’m wondering about some behavior I have seen. Here is a simple query in our database (sanitized for posting):

SELECT MAX("peak") AS "peak",SUM("gauge") AS "gauge" FROM m WHERE "tag1"="val1" AND time >= '2017-04-25T15:01:10Z' GROUP BY tag2, tag3
name: m
tags: tag2=valX, tag3=valY
time                 peak gauge
----                 ---- -----
2017-04-25T15:01:10Z 3848 5982

Ok, that’s great. But look what happens when I do some simple math on the fields:

SELECT MAX("peak")/10.0*8 AS "peak",SUM("gauge")/620602.559674*8 AS "gauge" FROM m WHERE "tag1"="val1" AND time >= '2017-04-25T15:01:10Z' GROUP BY tag2, tag3
name: m
tags: tag2=valX, tag3=valY
time                 peak   gauge
----                 ----   -----
2017-04-25T15:01:10Z        0.07711215375124872
2017-05-01T01:50:00Z 3078.4 

Any idea why I end up with two series like this? It’s not what I was expecting (or wanting).

#2

Update: this turned out to be a known issue.

1 Like