Section: Frame clause cheatsheet

Current row only

sql
sql
ROWS BETWEEN CURRENT ROW AND CURRENT ROW
Explanation

Useful in examples and to contrast with broader frames.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Frame clause cheatsheet
Last 7 rows
Rolling seven-row frame.
OpenIn sheetsqlsame section
Current and next 3 rows
Forward-looking frame.
OpenIn sheetsqlsame section
Whole partition
Every row in the current partition.
OpenIn sheetsqlsame section
Explicit ROWS frame
Define exactly which physical rows are included.
OpenIn sheetsql1 tag match
Exclude the current row from a frame
Compare a row against all earlier rows only.
OpenIn sheetsql1 tag match
Count all rows without collapsing them
Return total row count on every row.