SQL MAX

MAX function is used to get the most value for a given column.

MAX SQL syntax:

SELECT MAX (column) FROM table

MAX SQL Example:

Given the following table 'orders'

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

Return the value 490, which is maximum value for column 'price' of the query.