ORA-30484
missing OVER clause, or invalid identifier found for window function
        
        Cause
The OVER keyword was expected but not found. It may be due to one of the following reasons.
- The OVER clause for the window function was missing.
- There were unexpected identifiers before the OVER keyword. Note that for FIRST_VALUE, LAST_VALUE, NTH_VALUE, LEAD, and LAG, the IGNORE/RESPECT NULLS and FROM FIRST/LAST can only be specified either in the argument or before the OVER keyword.
- A ranking function was given, and it was intended to be used to aggregate, but the argument of the function was missing.
Action
Fix the syntax by adding the OVER clause for the window function if it was missing, or removing invalid identifiers, or adding an argument for ranking functions.