In MariaDB, WEEK() is a built-in date and time function that returns the week from a given date expression.
It accepts two arguments; the date you want to extract the week from, and an optional mode argument to specify the mode to use in the result.
It returns the week as a number in the range 0 to 53 or 1 to 53, depending on the mode being used.