Invalid use of an aggregate function

Error constant SQLE_AGGREGATES_NOT_ALLOWED
ODBC 2 state 37000
ODBC 3 state 42000
Severity 15
SQLCODE -150
SQLSTATE 42W06
Sybase error code 13204
 Probable cause
 More information