SQL MAX Function
Posted by JeffSep 19
SQL uses the MAX function to find the maximum value in a column. The syntax for using the MAX function is:
SELECT MAX(“column_name”)
FROM
“table_name”
For example, if we want to get the highest sales from the following table,
Store Sales Information
| Store Name | Sales |
|---|---|
| Atlanta | $1500 |
| Boston | $250 |
| LA | $300 |
| Dallas | $700 |
we would type in
SELECT MAX(Sales) FROM Store_Information
Result:
MAX(Sales)
$1500
$1500 represents the maximum value of all Sales entries: $1500, $250, $300, and $700.


Leave a Reply