Window Function Restrictions An  OVER  clause can only add properties to a named window, not modify them. If the named window definition includes a partitioning, ordering, or framing property, the  OVER  clause that refers to the window name cannot also include the same kind of property or an error occurs: •This construct is permitted because the window definition and the referring  OVER  clause do not contain the same kind of properties: •This construct is not permitted because the  OVER  clause specifies  PARTITION BY  for a named window that already has  PARTITION BY : •This is permitted; it contains forward and backward references but no cycles: •This is not permitted because it contains a cycle: • DISTINCT  syntax for aggregate window functions. •Nested window functions. •Dynamic frame endpoints that depend on the value of the current row. •The  GROUPS  frame units specifier is parsed, but produces an error. Only  ROWS  and  RANGE  are supported. •The  EXCLUDE  clause for frame specification is parsed, but produces an error. • IGNORE NULLS  is parsed, but produces an error. Only  RESPECT NULLS  is supported. • FROM LAST  is parsed, but produces an error. Only  FROM FIRST  is supported. 2433 12.22 Performance Schema Functions 12.21.5 Window Function Restrictions FIRST_VALUE(year) OVER (w ORDER BY year ASC) AS first, FIRST_VALUE(year) OVER (w ORDER BY year DESC) AS last FROM sales WINDOW w AS (PARTITION BY country); OVER (w ORDER BY country) ... WINDOW w AS (PARTITION BY country) OVER (w PARTITION BY year) ... WINDOW w AS (PARTITION BY country) The definition of a named window can itself begin with a  window_name . In such cases, forward and backward references are permitted, but not cycles: WINDOW w1 AS (w2), w2 AS (), w3 AS (w1) WINDOW w1 AS (w2), w2 AS (w3), w3 AS (w1) The SQL standard imposes a constraint on window functions that they cannot be used in  UPDATE  or DELETE  statements to update rows. Using such functions in a subquery of these statements (to select rows) is permitted. MySQL does not support these window function features: The parser recognizes these window constructs which nevertheless are not supported: