MIN Function in SQL

Level 242 keystrokes

MIN function returns the smallest value in a column.

SQL code

1SELECT
-- MIN returns the smallest price value; NULL values are ignored
-- AS lowest names the result column
2 MIN(price) AS lowest
3FROM
4 products;

Output

+--------+
| lowest |
+--------+
|   0.75 |
+--------+
1 row in set
Practice typing this code

Practice typing this code. Results are not recorded in the rankings.

Symbols in this code

The symbols you type in this SQL code and how often they appear.

  • ;× 1
  • (× 1
  • )× 1

More SQL examples at level 2

← SQL typing practice