
Answer-first summary for fast verification
Answer: ORDER BY, PARTITION BY
The question asks for valid sub-clauses of the OVER clause in window functions. In Snowflake SQL syntax, the OVER clause can include PARTITION BY to divide the result set into partitions and ORDER BY to define the order of rows within each partition for window functions. These are standard sub-clauses for window functions. GROUP BY is used for aggregate functions without windowing, LIMIT restricts the number of rows in the entire result set, and UNION ALL combines result sets from multiple queries; none of these are sub-clauses of OVER. The community discussion shows 100% consensus on CD, with comments referencing correct syntax (e.g., 'OVER ([ PARTITION BY <expr1> ] [ ORDER BY <expr2> ])') and upvoted explanations confirming this.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.