From Access Help:
GROUP BY Clause
Combines records with identical values in the specified field list into a
single record. A summary value is created for each record if you include an
SQL aggregate function , such as Sum or Count, in the SELECT statement.
Syntax
SELECT fieldlist
FROM table
WHERE criteria
[GROUP BY groupfieldlist]
A SELECT statement containing a GROUP BY clause has these parts:
Part Description
fieldlist The name of the field or fields to be retrieved along with any
field-name aliases, SQL aggregate functions, selection predicates (ALL,
DISTINCT, DISTINCTROW, or TOP), or other SELECT statement options.
table The name of the table from which records are retrieved.
criteria Selection criteria. If the statement includes a WHERE clause, the
Microsoft Jet database engine groups values after applying the WHERE
conditions to the records.
groupfieldlist The names of up to 10 fields used to group records. The order
of the field names in groupfieldlist determines the grouping levels from the
highest to the lowest level of grouping.
SQL already has select distinct
You can switch in SQL view and insert the word DISTINCT right after the
SELECT:
[quoted text clipped - 31 lines]