Ranged data aggregations

Heard a lot of good things about SingleStore and want to give it a try.

The problem I’m having is as follows:

I have ‘shifts’ table with the following ranged data I want to make aggregates on:

ID   | started_at          | ended_at          | costs
1    |  2022-08-23 08:00   | 2022-08-23 11:00  | 150
2    |  2022-08-23 08:30   | 2022-08-23 09:30  | 50

Is there any functionallity in SingleStore to easilly get for example the following data:

time             | total_costs  | total_count
2022-08-23 08:00 | 75           | 2
2022-08-23 09:00 | 75           | 2
2022-08-23 10:00 | 50           | 1

Hope someone can get me on the right way.

Thanks!

Hi Matt! Welcome aboard! :wave:
Sorry about the trouble you’re having as you’re just getting started. We’re happy to help.

Are you running on the managed or self hosted service and what version?

Hello Matt,

I would check that tutorial to work with time series data to get started: Analyzing Time Series Data · SingleStore Documentation

1 Like

I also have facing the same problem.