I have a table with the following fields:
symbol, date_time, price, volume
I need to extract a list which the following values from this table, for
each hour (in date_time field):
- price where date_time is the earliest for that certain hour.
- price where the date_time is the last from that hour.
- The sum of volume from that hour.
I have tried to get the list of symbols, then get each hourly period and
calculate those 6 values for each period, but there are many symbols and
very many periods, and it takes very very much time.
Is there a more intelligent way of getting those values in another way than
symbol by symbol and period by period?
Thank you very much.