INSERT INTO TEACHER (HIREDATE)
SELECT HIREDATE
FROM LESSON
WHERE (SELECT LESSONDATETIME,MIN(LESSONDATETIME) KEEP(DENSE_RANK FIRST ORDER BY LESSONDATETIME)
OVER (PARTITION BY TEACHERPC) FROM LESSON JOIN TEACHER ON TEACHER.PC_TEACHER=LESSON.TEACHERPC)