Hello guys!
I've encountered really strange error with usage of window functions inside CTE. When i include window function field into CTE and OVER() clause is empty it works correctly, but when I try to add ORDER BY/PARTITION BY inside the OVER() clause i'm encountering following error : '[42000][42000] Syntax error in SQL statement "WITH statement supports only SELECT, TABLE, VALUES, CREATE TABLE, INSERT, UPDATE, MERGE or DELETE statements" '
One clarification : when i run statements using windows functions with PARTITION BY\ORDER BY parts not inside CTE it works well.