Analytic functions run against a query, which is why I suggested using a MERGE with an UPDATE clause. This allows you to easily use a query as the source of the data, making the use of analytic functions possible.
You are trying to use them out of the context, which is why they fail.
If you look up the error message, you will see exactly why this will not work.
"ORA-30483: window functions are not allowed here
Cause: Window functions are allowed only in the SELECT list of a query. And, window function cannot be an argument to another window or group function.