Archives of the TeradataForum
Message Posted: Tue, 21 Mar 2006 @ 19:23:48 GMT
A "previous" value is calculated by
min(colA) over (partition by colB, colC order by colD rows betwen 1 preceding and 1 preceding)
This is mainly usefull if the "previous" row is not easily calculated (i.e. not "col - 1").
But if you can write the query with a simple join this will probably perform better.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|