If you’re getting an error that reads “ERROR: argument of ntile must be greater than zero” in PostgreSQL, it’s probably because you’re calling the ntile()
function with a non-positive integer.
This error occurs when we pass a non-positive integer to the ntile()
function.
To fix this issue, be sure to pass a positive integer to the function.
Continue reading