Thanks a lot Dieter.Your SQL worked as expected.
I have few questions regarding my old query with analytic functions:
1. As per my knowledge,the reset command within the OLAP function should create the sub partition when evalutes to true.so in my case statement the below reset will take the second min (ie., (+23:59) 3/1/2010 17:59) when it evalutes to true?
RESET WHEN START_TIME >= min(START TIME + interval '23:59:59' HOUR TO SECOND) OVER(PARTITION BY A,B
ORDER BY START_TIME ROWS ROWS BETWEEN 1 FOLLOWING AND 1 FOLLOWING
2. how does the rows ,rows between (preceding,following,unbounded preceding / following) works
Thanks,
Bala
↧