week

BigQueryDb2 (LUW)MariaDBMySQLOracle DBPostgreSQLSQL ServerSQLite200520072009201120132015201720192021⊘ 3.5.7 - 3.39.0⊘ 2008R2 - 2019⚠ 8.3 - 14be⊘ 11gR1 - 21c⚠ 5.0 - 8.0.30a⚠ 5.1 - 10.9.2a⚠ 11.5.7de11.5.6cd⚠ 11.1 - 11.5.5c⊘ 9.7 - 10.5⚠ 2.0
  1. Sunday-based weeks with first Sunday in year
  2. Use extract(isoyear) for the corresponding year
  3. Buggy? Jan 1 seems to be always week 1
  4. Buggy! E.g. 2005-01-01 till 2005-01-08 all belong to week 1 (Eight days a week)
  5. ISO 8601 week date (year’s first Thursday)