All Forums Database
karthi MB 1 post Joined 01/15
16 Jan 2015
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..

Raja_KT 1246 posts Joined 07/09
16 Jan 2015

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 :)

Raja K Thaw
My wiki: http://en.wikipedia.org/wiki/User:Kt_raj1
Street Children suffer not by their fault. We can help them if we want.

You must sign in to leave a comment.