Microsoft Access Database Development With VBA

SQL Keywords: GROUP



The GROUP keyword is used in conjunction with the BY keyword in a WHERE statement to specify a condition used to find a record.

Here is an example:

SELECT Videos.CopyrightYear
FROM Videos
GROUP BY Videos.CopyrightYear;

Here is another example:

SELECT   Videos.CopyrightYear, Count(Videos.CopyrightYear) AS CountOfCopyrightYear
FROM     Videos
GROUP BY Videos.CopyrightYear
HAVING  (Videos.CopyrightYear) Is Not Null;

Home Copyright © 2013-2015, FunctionX, Inc. Home