Seaquel
SQL Server error code

SQL Server error 1045

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

Aggregates are not allowed in this context. Only scalar expressions are allowed.
Msg1045
Severity15
Group1000–1999

Source: Database Engine events and errors