SQL LAST_VALUE with FOR statement
SQL LAST_VALUE with WHILE statement
SQL LAST_VALUE with IF statement
SQL LAST_VALUE with CASE statement
SQL LAST_VALUE with WITH statement