Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

Filter consecutive records that have same value as preceding record - response (1) by mohan.mscss

$
0
0
Here it is... sel csum(1,c1) ,con_rec.* ,min(c2) over (rows between 1 preceding and 1 preceding) as a , min(c3) over (rows between 1 preceding and 1 preceding) as b ,case when c2=a and c3=b then 'n'else 'y' end as res from con_rec qualify res='y';

Viewing all articles
Browse latest Browse all 27759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>