Cannot group on fields selected with '*'. (Error 3121)

You tried to execute a SELECT statement that groups or totals all fields from all tables, selected with an asterisk ( * ).

Possible cause:

  • You created an SQL statement that includes an aggregate function or GROUP BY clause that refers to a field you selected with an asterisk. This error occurs, for example, if you enter the following SQL statement:

    SELECT * FROM Orders GROUP BY ShipVia;