Pie-chart showing count of times in a timeseries within ranges

Hi,

I’ve got an InfluxDB time-series database which contains time-measurements (timings) called ‘Total’.

I want to create a pie chart that shows for a given period, say 1 hour, how many timings are within

[0 - 5> sec
[5 -10> sec
[10 - 30> sec
[30 - 60> sec
[60 - 300> sec

When I define my query as:

q:“SELECT “Total” FROM “timings” WHERE (“deployment” =~ /^perftest$/) AND time >= now() - 6h”

I get the result in the Query Inspector:

response:Object
    results:Array[1]
        0:Object
            statement_id:0
            series:Array[1]
                0:Object
                    name:"timings"
                    columns:Array[2]
                        0:"time"
                        1:"Total"
                    values:Array[770]
                        0:Array[1562135964000,66146]
                        1:Array[1562136057000,5251]
                         ...
                        769:Array[1562157415000,6589]

I tried all kinds of queries, but everytime, the pie has only one piece, the full pie.

Help is greatly appreciated.

ThreeAxis