In SQL databases, the FIRST_VALUE()
function is a window function that returns the first value in an ordered set of values.
The exact syntax will probably depend on your DBMS, but it will usually require an OVER
clause to determine how the rowset is partitioned and ordered before the window function is applied.