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,
Code:
DATETIME COL1 COL2
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?
Regards