Syntax
QUARTER(date)
Purpose
QUARTER() returns the quarter value of the specified date. The value range is [1,4].
Examples
obclient> SELECT QUARTER(NOW()), NOW();
+----------------+---------------------+
| QUARTER(NOW()) | NOW() |
+----------------+---------------------+
| 3 | 2021-07-12 19:45:01 |
+----------------+---------------------+
1 row in set