Your Knowledge Base has moved to the new Help Center.  Check out the release notes for details. And don't forget to update your bookmarks and in-house documentation before May 28.

MAX

 

MAX returns the highest value from a group of values. The group is determined by the FROM clause that follows and may represent all records or a subset. 

Basic Syntax

In its most basic form, the MAX returns the maximum field value in all records returned by the rest of the query. 

MAX( <field-name> ) FROM <from-clause>

Examples

The following field example returns the earliest donation date for Donor:

(SELECT MIN(D.Donation_Date) 
  FROM Donations D 
  WHERE D.Donor_ID = Donors.Donor_ID) AS [First Donation]
View Examples

Resources