How to achieve the below output in teradata?

Database

How to achieve the below output in teradata?

Hello all,

Am newbee to Teradata, Can some one help me how to achieve the below two result scenario from first table?

Table 1:
Id cust start end
1 a 2015-01-01 2015-01-08
1 a 2015-01-09 2015-01-10
1 a 2015-01-11 2015-02-11
1 a 2015-01-12 2015-02-11
1 a 2015-02-02 2015-12-31

Result set 1:

Id cust start end
1 a 2015-01-01 2015-01-08
1 a 2015-01-09 2015-01-10
1 a 2015-02-02 2015-12-31

Result set 2:

Id cust start end
1 a 2015-01-01 2015-12-31

Many thanks..
1 REPLY
Enthusiast

Re: How to achieve the below output in teradata?

Can you please tell a so-to-say user story or use case of how you arrived at result set 1 and result set 2?  It will be interesting :)