I have two tables like below (date format: yyyy-MM-dd): 1) Table1 - EMPLOYEE_OVERTIMES (alias: EO)
EMPLOYEE_ID | OVERTIME_DATE --------------------
Would this work?
SELECT EO.Employee_ID, EH.Start_Date, EH.End_Date, EO.OverTime_Date FROM EMPLOYEE_OVERTIMES EO INNER JOIN EMPLOYEE_HOLIDAYS EH ON EO.Employee_ID = EH.Employee_ID WHERE EO.Overtime_Date BETWEEN EH.Start_date and EH.End_Date