Calling this function returns the newest value of a column or expression, based on the timecode. When dragging a Last element into a variable, the following tree element is created.
Variable Creation > Input > Variables: SQL Elements pane - Aggregation > Time Series > Last Value

A Column or other non-aggregate expression can be moved over the (empty-Value Expression) branch of the tree.