Seaquel
SQL Server error code

SQL Server error 4108

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

Windowed functions can only appear in the SELECT or ORDER BY clauses.
Msg4108
Severity16
Group4000–4999

How to fix it

In other databases

Source: Database Engine events and errors