Max() and Min() function in MS Access

1. Max() Function :
max() function return the maximum value of given set. In the function a query is passed and in the eligible records which value will be maximum that will return as result. A expression will be pass as parameter and it will return the maximum value in the expression.

Syntax :

Max (expression)

Demo Database for example :

Table name : student

student_id Marks
121 56
122 45
123 89
124 50

Example-1 :



SELECT Max(Marks) AS marks 
FROM student;

Output –

marks
89

Example-2 :

SELECT Max(Marks) AS marks 
FROM student
where Marks<80;

Output –

marks
56

2. Min() Function :
min() function works like max() function but it will return the minimum value of the expression. In this function a query will be passed as parameter and it will return the minimum record.

Syntax :

 Min(expression)

Example-1 :

SELECT Min(Marks) AS marks 
FROM student;

Output –

marks
45

Example-2 :

SELECT Min(Marks) AS marks 
FROM student
where Marks>50;

Output –

marks
56
My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.