T
teter09
I am trying to create a program that will calculate holiday and sick pa
(we base it on a calculated average of hours over the last 12 weeks)
The tabkle is called "Hours", there is a foreign key of Employee_ID
the column with the date is called "Week_Start" and the hours worke
are called "Hours".
I want to be able to list the employee_ID with the calculated averag
of the 12 most recent entries by date. How can I call the 12 mos
recent entries? This would then be divided 60 (the 12 weeks and 5 days
I know it's odd but works at my office) which I think I can adapt onc
I get this main query.
This is where I was headed but I don't think it is even close:
Select Employee_ID, Average=(Sum(Hours)/60)
From Hours
*Having Recent(Work_Week_Start)=8*
Group By Employee_ID
The bold section is where I'm having trouble. All help is appreciated
(we base it on a calculated average of hours over the last 12 weeks)
The tabkle is called "Hours", there is a foreign key of Employee_ID
the column with the date is called "Week_Start" and the hours worke
are called "Hours".
I want to be able to list the employee_ID with the calculated averag
of the 12 most recent entries by date. How can I call the 12 mos
recent entries? This would then be divided 60 (the 12 weeks and 5 days
I know it's odd but works at my office) which I think I can adapt onc
I get this main query.
This is where I was headed but I don't think it is even close:
Select Employee_ID, Average=(Sum(Hours)/60)
From Hours
*Having Recent(Work_Week_Start)=8*
Group By Employee_ID
The bold section is where I'm having trouble. All help is appreciated