SQL MIN() Function

The SQL MIN() is a function, and return the lowest or minimum value of a numeric table column from query result.

The SQL MIN() function is supports only numeric column.

It can be used in SQL SELECT statement as well in SQL WHERE clause.

Search Keys

  • sql min function
  • min function
  • min sql
  • min date sql
  • sql min date
  • sql server min date
  • sql date min
  • sql minimum value
  • minimum sql

SQL MIN() Syntax

The below syntax is used to select specific column from the specific table.

SELECT MIN(column_name1) FROM table_name;

Sample Database Table - Employee

ID EmpName Designation Dept JoinYear Salary
1 Vidyavathi Mobile Database PHP 2012 8090.8
2 Hanumanthan Database Query Engine Oracle 2015 3470.7
3 Geetha SQL Database SQL Server 2013 3890.3
4 Keshavan Computer Science PHP 2012 2840
5 Azaghu Varshith Cloud Database Java 2012 11030.6
6 Ramanathan Big Data Oracle 2013 2000
7 Sakunthala SQL Mining Java 2014 2630.2
8 Chandra Information Tech MySQL 2013 12080
9 Varshini Kutty Manager MS Access 2014 14600
10 Dharan Tester SQL Server 2014 12920
11 Devi Mai Employee Oracle 2013 22580
12 Ranjani Mai Mobile Database PHP 2015 5990.3

SQL MIN() Example

The following SQL SELECT statement find the lowest or minimum value of "Salary" column from the "Employee" table:

MIN(Salary) As 'Minimum Salary' 
FROM Employee;

The result of above query is:

Minimum Salary

SQL MIN() Example - Using Group By Clause

The following SQL SELECT statement find the lowest or minimum salary in all "Dept" column from the "Employee" table:

Dept, MIN(Salary) As 'Minimum Salary' 
FROM Employee 

The result of above query is:

Dept Minimum Salary
Java 2630.2
MS Access 14600
MySQL 12080
Oracle 2000
PHP 2840
SQL Server 3890.3

Search Keys

  • aggregate functions in sql
  • sql aggregate functions
  • aggregate query
  • sql aggregate functions examples
  • sql find lowest value
  • sql lowest
  • sql aggregate queries
  • sql aggregate functions with examples
  • sql aggregate functions list