Seaquel
SQL Server error code

SQL Server error 5309

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

Windowed functions, aggregates and NEXT VALUE FOR functions do not support constants as ORDER BY clause expressions.
Msg5309
Severity16
Group5000–5999

Source: Database Engine events and errors