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

Get the previous row's column Value - topic by gv

$
0
0
Hello All, I have got source data in following way: Col_1 | Col_2 100 | 2000 100 | 3000 100 | 4000 300 | 5000 300 | 6000 300 | 7000 I need to generate an extra column as Col_3 (based upon Col_2) where it contains the value from previos row, starting from 0 for  every group based on Col_1. The outcome expected as:     Col_1 | Col_2 | Col_3 100 | 2000 | 0 100 | 3000 | 2000 100 | 4000 | 3000

read more


Viewing all articles
Browse latest Browse all 27759

Trending Articles



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