help me to group the records as the resultset given below.
Table
ID TYPE STDT ENDT
1 A 1Aug 10Aug
1 A 11Aug 20Aug
2 B 21Aug 30Aug
2 B 31Aug 9Sep
1 A 10Sep 20Sep
Below is the expected resultset
ID TYPE STDT ENDT
1 A 1Aug 20Aug
2 B 21Aug 9Sep
1 A 10Sep 20Sep