I need help with oracle SQL. The data in the table is as given below.' For given data I need to create a bands based on COB dates range and Values.
COB VALUE
-----------------
4/5/2012 20
4/6/2012 20
4/7/2012 22
4/8/2012 21
4/9/2012 20
4/10/2012 21
4/11/2012 21
4/12/2012 22
4/13/2012 20
The output I am expecting is as given below:
START_DT END_DT VALUE
----------------------------------
4/5/2012 4/7/2012 20
4/7/2012 4/8/2012 22
4/8/2012 4/9/2012 21
4/9/2012 4/10/2012 20
4/10/2012 4/12/2012 21
4/12/2012 4/13/2012 22
4/13/2012 null 20
Can someone help please?