Skip to main content
/1 min read

SQL MIN Tutorial

How MIN Works

Returns Lowest Value

MIN retrieves the minimum value of a given column.

Syntax

SELECT MIN(column_1) FROM table;

Common Use

Finding the player with the fewest assists — SELECT MIN(assists) FROM players;

NULLs Are Skipped

MIN ignores NULL values — only considers actual numbers.

Master SQL at Noble Desktop

Noble Desktop's SQL Bootcamp covers queries, joins, aggregations, and the full SQL toolkit data analysts use every day.

Learn the basics of the MIN function and how and when to use it in this tutorial.

MIN Function

  • The MIN function is used to find the minimum value of a given column.

  • It retrieves the minimum value of a given column from our data.

  • Syntax: SELECT MIN(column_1) FROM table ;

Example

Let’s say we have a basketball league and we keep records of each player, which team they are on, and their basic statistics.

Stats Table

If we wanted to use a SQL query to find the player with the least assists, we would write the following:

SQL MIN statement

Once we hit ENTER and run, our result should be as follows:

SQL MIN Result