Concept Flow - FIRST_VALUE and LAST_VALUE
Start Query
Partition Data (optional)
Order Rows within Partition
Apply FIRST_VALUE/LAST_VALUE Window Function
Return Result Set with New Columns
End Query
The query starts by optionally partitioning data, then ordering rows, applying FIRST_VALUE or LAST_VALUE to get first or last values in the window, and returns the result.
