Help Pls! Calculated Grouped Querry

kirankonsaai

New member
Local time
Today, 17:49
Joined
Jul 30, 2007
Messages
2
Hi Guys,

can anybody help me on the below?

i need to generate a query contains

name, project, total_Hours_worked (only if total is >45) for a week by each employees. the query should contain total hours for all the weeks.
The table contains week_ID column and dyas worked column.
i can create a query which gives me sum of day_hours worked using selecct sum(day_hours) as Total.

but i badly need total sum of week hours worked by each employees. so that i can generate overtime report grouped on weekly who has woked more than 45 hours per week.

the table is attached. please see and help me if you can.

Thanks
Kiran Konsaai
 

Attachments

You can do this by running an Aggregate query using the week_id like this

SELECT DISTINCTROW tblTimeSheet.WeekID, tblTimeSheet.empname, Sum(tblTimeSheet.Duration) AS [Sum Of Duration]
FROM tblTimeSheet
GROUP BY tblTimeSheet.empname,tblTimeSheet.WeekID;
 
rabbie,

sorry for the late reply. i was on one week vacation..

by the way thanks a lot .. thats what i was looking for. cani i have weekly total only which exceeds 45 hours?

thanks again,
Kiran Konsaai
 

Users who are viewing this thread

Back
Top Bottom