Histogram with aggregate function?

Hi! I have data that I would like to visualize in a histogram. The data represents the inclination of an object measured every second (captured from a sensor) and I’d like to produce a graph that shows how many seconds that object was in certain positions (let’s say between 0° and 90° in 10° intervals).
I tried to do this with the aggregate and count function which partially works, but I’m struggling with how to move from one interval to the next.
Is this something that can be achieved with the aggregate function or does that require setting up a loop function with codeless?
Grateful if anybody could point me in the right direction here!

You have to create request for each interval.
Or you can beforehand set the mark of interval, and then you will be able aggregate on it.
In the second case, you may have to change the mark of interval if the requirements are changed.