While using a simple query such as this SELECT `ts`, FLOOR(`ts` TO WEEK) as `week_start`, CEIL(`ts` TO WEEK) as `week_end` FROM some_table
I get some weird results like these: 2021-03-01T00:00| 2021-02-25T00:00| 2021-03-04T00:00 Which is obviously wrong since March 1st is on Monday, February 25th is Thursday as well as March 04th. I've tried different combinations of timezone configurations and with both timestamps and dates, with the same results. Is there anything obviously wrong in that query? Is there any configuration to keep in mind for the start of week day? -- Sebastián Ramírez Magrí