Syntax
DAYOFYEAR(date)
Purpose
DAYOFYEAR() returns the ordinal number of the day in the year of date.
Examples
obclient> SELECT DAYOFYEAR('2021-07-15');
+-------------------------+
| DAYOFYEAR('2021-07-15') |
+-------------------------+
| 196 |
+-------------------------+
1 row in set