Argument to GROUPING aggregate must be a grouping column in the GROUP BY clause

Error constant SQLE_INVALID_GROUPING_AGGREGATE
ODBC 2 state 37000
ODBC 3 state 42000
Severity 15
SQLCODE -962
SQLSTATE 42WA7
Sybase error code 13527
 Probable cause