In SQL Server, if you’re getting an error that reads “The function ‘PERCENT_RANK’ must have an OVER clause”, it’s because you’re calling the PERCENT_RANK()
function without an OVER
clause.
The PERCENT_RANK()
function requires an OVER
clause (and that clause must have an ORDER BY
clause).
To fix this issue, be sure to include an OVER
clause when calling the PERCENT_RANK()
function.