I have a question for a SQL query I am trying to build. I have the following tables
Stores Employee ID, week ending date and the times worked by an employee
Stores Employee ID and holidays booked by an employee
I am working on a summary report that should show the total hours worked by an employee in a week and the holidays taken.
I this example employee 546 worked 56 hours but was on holiday on the 22nd and between the 24th and 27th of January
The summary report shows 5 days total holiday BUT I want it to show 4 days because the 27th of January holiday was outside week ending 26/01/2014