Seaquel
SQL Server error code

SQL Server error 8124

SQL Server raises error 8124 at severity 16, which marks a problem with the query or data that you can correct.

Multiple columns are specified in an aggregated expression containing an outer reference. If an expression being aggregated contains an outer reference, then that outer reference must be the only column referenced in the expression.
Msg8124
Severity16
Group8000–8999

Source: Database Engine events and errors