DAYOFYEAR

Returns an integer between 1 and 366, which represents the day of the year where 1 is January 1. The argument must be a date or a timestamp.

Example:

Using the EMPLOYEE table, return the average of the day of the year that employees started on (HIREDATE).

  SELECT AVG(DAYOFYEAR(HIREDATE))
    FROM EMPLOYEE