Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2008

    Unanswered: Taking the difference....9i

    Hi guys

    I have a table with X number of columns (column type number) where entries come in every 15 min. The values that come in are cummulative.

    I need to summarize these entries to an hourly basis so that the value shown at 1am shows the increment from the value that came in at 15 min past the hour.

    So if,

    1:00AM           2      10
    1:15AM           3      15
    1:30AM           4      20
    1:45AM           5      25
    2:00AM           6      30
    After summarizing these values, I need the value at 2:00AM to show the values 3 and 15 like:
    DATETIME COL1       COL2
    2:00AM       3=(6-3) 15 =(30-15)
    and so on.
    I tried out the LAG function but the LAG function seems to apply to individual columns. I need to find the difference mentioned above for all X columns with one command, if possible.

    Could someone advise please?


  2. #2
    Join Date
    Aug 2003
    Where the Surf Meets the Turf @Del Mar, CA
    Provided Answers: 1
    Where to_char(datetime,'mi') = '00' or to_char(datetime,'mi') = '15'
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

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