Unanswered Creating View by aggregating data

  • 7 июля 2009 г. 21:49
     
     
    I'm a newbie and would like to get some ideas on this problem:

    I have a table which has the following structure:
    ID          Timestamp                  Value
    1            2009-07-07 9:00:00      2
    1            2009-07-07 9:38:00      10
    1            2009-07-07 10:05:00     3

    The tables will have data per minute (above example just shows couple of examples)

    Now I want to create a view that aggregates the data hourly. so example would lool like:
    ID            Timestamp               Value
    1              2009-07-07 9:00:00    12
    1              2009-07-07 10:00:00    3

    So first row represents data from 9:00 AM to 9:59 AM and soo on.