SQL LAST

LAST SQL function is used to obtain the value of a column in the last row of the selection.

LAST SQL syntax:

SELECT LAST(column) FROM table

LAST SQL example:

Given the following table 'orders'

idorderclientprice
1p1HARRY100
2p2CLARK300
3p3SMITH250
4p4BROWN490
5p5WHITE60
SELECT LAST(price) FROM orders

Return the value 60, which is the value for column 'price' of the last row of the table.