Access: Min Function

In Access, the Min function returns the minimum of a set of values contained in a select query.

The syntax for the Min function is:

Min( expression )

The expression argument represents a string expression identifying the field that contains the data you want to evaluate or an expression that performs a calculation using the data in that field. Operands in expr can include the name of a table field, a constant, or a function (not one of the other SQL aggregate functions). You can use Min to determine the smallest values in a field based on the specified aggregation, or grouping.

SQL query

In Access, you can use the Min function in the query design grid, in an SQL statement in SQL view of the Query window, or in an SQL statement within Visual Basic code. It is used in conjunction with the Group By clause.

Select SellerID, Min(Price) as MinPrice
From Antiques
Group by SellerID
admin

admin

Leave a Reply

Your email address will not be published.