Retrieve the price of the lowest-priced product in the “Products” table.
SELECT MIN(Price) AS SmallestPrice FROM Products; |
The MIN() function retrieves the smallest value from a set of values.
Note: Consider using the MAX() function for retrieving the largest value.
MIN(expression) |
Parameter |
Description |
expression |
Required: A numerical value, which may be represented by a field or a formula. |
Works in: |
SQL Server (beginning from 2008), Azure SQL Database, Azure SQL Data Warehouse, and Parallel Data Warehouse |