Learn the basics of the MIN function and how and when to use it in this tutorial.
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 ;
Let’s say we have a basketball league and we keep records of each player, which team they are on, and their basic statistics.
If we wanted to use a SQL query to find the player with the least assists, we would write the following:
Once we hit enter and run, our result should be as follows: