In window functions, what is the difference between RANGE and ROWS frame modes?

SQL Data Analyst Hard

SQL Data Analyst — Hard

In window functions, what is the difference between RANGE and ROWS frame modes?

Key points

  • ROWS counts physical rows, while RANGE groups logically equal ORDER BY values
  • RANGE creates frames based on ORDER BY values, not physical row count
  • Understanding this distinction is crucial for accurate window function usage

Ready to go further?

Related questions