Aggregated expression '%1' contains multiple columns of which one or more are outer references

Error constant SQLE_MULTIPLE_AGGREGATE_COLUMNS
ODBC 2 state 37000
ODBC 3 state 42000
Parameter 1 The aggregated expression in error.
Severity 15
SQLCODE -861
SQLSTATE 42W68
Sybase error code 13865
 Probable cause