The SQL MIN aggregate function is used to determine the smallest values respectively in a column.
The SQL MIN syntax is looks like this:
SELECT MIN ( [COLUMN NAME] )
FROM [TABLE NAME]
EXAMPLE :
We can see with a simple example which is return smallest value of the scores in the table.
Table GameScores
PlayerName | Department | Scores |
Jason | IT | 3000 |
Irene | IT | 1500 |
Jane | Marketing | 1000 |
David | Marketing | 2500 |
Paul | HR | 2000 |
James | HR | 2000 |
SQL statement :
SELECT MIN(Scores)
FROM GameScores
Result:
MIN(Scores) |
1000 |