Results 1 to 4 of 4
  1. #1
    Join Date
    May 2002
    Posts
    15

    Unanswered: roll up half hour data to hour

    Hi,

    Can anyone help me with writing a query which summarizes an half-an-hour data to hourly data. I have table A as follows:

    Table A:
    time <half hour unix time>
    col A
    col B
    col C

    I need to roll this table to get data by hour.


    Thanks in advance.

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Could you give the exact DDL for the table. Also provide what you would like to see as the result.

    Andy

  3. #3
    Join Date
    May 2002
    Posts
    15
    sorry got it...

    select time/3600*3600, sum(colb), sum(colc) from table;

  4. #4
    Join Date
    Jan 2003
    Posts
    1,605
    select time/3600*3600, sum(colb), sum(colc) from table;
    Hi,

    This probably doesn't work. 3600/3600 = 1 !!!

    Grofaty

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •