Source
A query using a correlated column inside a window function fails with internal error 300010:391167117
SOLUTION: To resolve this issue, avoid using correlated columns inside a window function. This can be achieved by moving the window aggregation function to the outer query.
Oracle - PL/SQL to Javascript
This is a translation reference to convert PL/SQL statements to snowflake JavaScript Collections & Records NoteSome parts in the output code are omitted for clarity reasons.