week

BigQueryDb2 (LUW)MariaDBMySQLOracle DBPostgreSQLSQL ServerSQLite200520072009201120132015201720192021⊘ 3.5.7 - 3.41.0⊘ 2008R2 - 2022⚠ 8.3 - 15bc⊘ 11gR1 - 21c⚠ 5.0 - 8.0.32a⚠ 5.1 - 10.11a⚠ 11.5.7 - 11.5.8be⚡ 11.5.6de⚠ 11.1 - 11.5.5d⊘ 9.7 - 10.5⚠ 2.0c⚠ 2.0a
  1. Sunday-based weeks with first Sunday in year
  2. ISO 8601 week date (year’s first Thursday)
  3. Use extract(isoyear) for the corresponding year
  4. Buggy? Jan 1 seems to be always week 1
  5. Buggy! E.g. 2005-01-01 till 2005-01-08 all belong to week 1 (Eight days a week)