instruction: For those employees who was hired before 2002-06-21, a bar chart shows the distribution of hire_date and the average of department_id bin hire_date by weekday, list by the Y in ascending please.
response: SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY AVG(DEPARTMENT_ID)