If you’re getting error 3581 in MySQL, which reads “A window which depends on another cannot define partitioning“, it’s probably because you’re using the PARTITION BY
clause in a window function that refers to a named window.
To fix this issue, don’t use the PARTITION BY
clause when referring to a named window.