List:General Discussion« Previous MessageNext Message »
From:Octavian Rasnita Date:February 13 2006 2:07pm
Subject:selecting min, max
View as plain text  
Hi,

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):

- symbol
- min(price)
- max(price)
- 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.

Teddy

Thread
selecting min, maxOctavian Rasnita13 Feb
  • Re: selecting min, maxRhino13 Feb
  • Re: selecting min, maxPeter Brawley13 Feb
  • Re: selecting min, maxOctavian Rasnita13 Feb
    • Re: selecting min, maxleo huang14 Feb
  • Re: selecting min, maxOctavian Rasnita13 Feb
  • Re: selecting min, maxRhino13 Feb