lead and lag

BigQueryDb2 (LUW)MariaDBMySQLOracle DBPostgreSQLSQL ServerSQLite200520072009201120132015201720192021⚠ 3.25.0 - 3.39.0c⊘ 3.5.7 - 3.23.1⚠ 2019⚠ 8.4 - 14c⊘ 8.3✓ 19c+⚠ 8.0.11 - 8.0.30be⊘ 5.0 - 5.7⚠ 10.2 - 10.9.2ac⊘ 5.1 - 10.1⚠ 11.5.0 - 11.5.7⚠ 2.0b⚠ 2.0a
  1. No default possible (3rd argument)
  2. No negative offsets
  3. No respect|ignore nulls
  4. Proprietary nulls treatment: lead(<expr>, 'IGNORE NULLS') (it’s a string argument)
  5. No ignore nulls