MS Access Min() Function
The Min()
function in MS Access finds the smallest value within a set of numbers.
Min(): Definition and Usage
It's a very useful aggregate function, often used in queries to find the minimum value in a column or the result of a calculation. This is particularly helpful for identifying the lowest price, smallest quantity, or earliest date in your data.
Related Function
The Max()
function is the counterpart to Min()
, returning the largest value in a set instead of the smallest.
Syntax
Syntax
Min(expression)
Parameter Values
Parameter | Description |
---|---|
expression |
A numeric value or expression that evaluates to a number. This could be a field name from a table or a calculation. This is required. |
Example
Finding the Minimum Price
This example finds the lowest price among all products in the "Products" table.
Syntax
SELECT Min(Price) AS SmallestPrice FROM Products;
Output
The query returns a single value representing the lowest price found in the 'Price' column of the 'Products' table.
SmallestPrice
-------------
9.99