What is the difference between DISTINCT CLAUSE and GROUP BY CLAUSE ?
DISTINCT applies to all the fields selected by the query; it retrieves just one (arbitrary) record if there are multiple records with the same values on those fields.
GROUP BY applies *individually* to the fields with GROUP BY as the aggregate function. It’s used in Totals queries; if you have some fields with GROUP BY you can have other fields with other totals operators such as Count, Sum, Avg and so on.
Functionally, a Totals query with GROUP BY on all fields (the default) would return the same records as a select query with the DISTINCT clause. I suspect the DISTINCT query would run faster, though.
The DISTINCT predicate eliminates duplicates from a column/field.
The DISTINCTROW predicate eliminates duplicate records.
The GROUP BY Clause is used to determine how your data is presented. Example, you may want to see your sales data grouped by year, quarter, and employeeID to keep the data in that order. You can group by up to 10 columns/fields.