MIN is an aggregate function which is used to obtain the minimum value out of all the values in a particular column.
Syntax:
SELECT MIN (<Column Name>) from <Table Name>
Example:
We have a table with the following data in the table SALES.
In order find out the minimum price out of all the sales we should use MIN function.
QUERY:
SELECT MIN(PRICE) FROM SALES
Result Set:
Result set contains minimum value of all the values in PRICE column.
Syntax:
SELECT MIN (<Column Name>) from <Table Name>
Example:
We have a table with the following data in the table SALES.
ITEM | PRICE |
ABC | 99.05 |
ABC1 | 110.99 |
ABC2 | 70.89 |
ABC3 | 100.99 |
ABC4 | 55.89 |
In order find out the minimum price out of all the sales we should use MIN function.
QUERY:
SELECT MIN(PRICE) FROM SALES
Result Set:
Result set contains minimum value of all the values in PRICE column.