Postgresql – how to skip previous row if specific values met using leg windowing function
This is my sample data id|score| --+-----+ 1| 10| 2| 20| 3| 30| 4| 40| 5| 50| 6| 60| 7| 30| 8| 30| 9| 90| 10| 100| My expected output is id|score|_prev_element| --+-----+-------------+ 1| 10| NULL| 2| 20| 10| 3|…