Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

Re: Window frame specification not supported

$
0
0

Hi Alexandru,

 

You can use LAG

 

LAG ( <expression> [, <offset> [, <default_expression>]] )

Returns value of the 'offset' rows before current row. The 'offset' should be non-negative and default is 1.

If the offset crosses boundaries of the partition 'default' value is returned. If the 'default' is not specified null value is returned.

The 'offset' and 'default' are evaluated at current row.

The output of LAG function can be non-deterministic among tie values.


select col1,col2,col3,

  LAG(col2) over (partition by col1 order by col3) as lag

from T;


Regards,

Krishna Tangudu


Viewing all articles
Browse latest Browse all 9165

Trending Articles



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