Sybase Error – Aggregated expression ‘%1’ contains multiple columns of which one or more are outer references

In this blog post, you’ll learn more about the Sybase Error Aggregated expression ‘%1’ contains multiple columns of which one or more are outer references and the reason for receiving this error

Sybase SQL Error Message

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

Reason for this Error

A subselect within the nested query contains an aggregate function whose parameters include an outer reference. In such cases, the outer reference must be the only column referenced in the expression.