Skip to content

MediumConceptAdvanced SQL

What is the difference between a window frame of ROWS and RANGE?

What a good answer covers

ROWS counts physical rows relative to the current row, while RANGE includes all rows whose ordering value is within the range, so peers with equal values are included together. The default frame with ORDER BY is RANGE from unbounded preceding to current row.

More on Advanced SQL

Flashcards for this topic