total hours overtime worked ?

joe31709

Registered User.
Local time
Today, 05:50
Joined
May 12, 2003
Messages
54
I am trying to write a query for a manager so he can see the total hours a user has worked a month.

I can get the query to do total overtimes but I can not get it to break down by month. Well I can get it to break down by month it will just show total hours worked for the days. It does not have a running total. Here is what I have for the SQL statement.

SELECT DISTINCTROW Sum(OVERTIME.[HOURS WORKED]) AS [Total Overtime], OVERTIME.[Last Name]
FROM OVERTIME
GROUP BY OVERTIME.[Last Name];


Any help would be great. Also if you could give me a pointer as to set it up where I could call out the month and get totals just for the month, not by individual users.

Thank you
 
SELECT Sum(OVERTIME.[HOURS WORKED]) AS [Total Overtime], OVERTIME.[Last Name], Month(OVERTIME.Date), Day(OVERTIME.Date)
FROM OVERTIME
GROUP BY OVERTIME.[Last Name],Month(OVERTIME.Date), Day(OVERTIME.Date);

Daily total by lastName, month, day

SELECT Sum(OVERTIME.[HOURS WORKED]) AS [Total Overtime], Month(OVERTIME.Date)
FROM OVERTIME
GROUP BY Month(OVERTIME.Date);

Monthly Total by month

Just did this off the top of my head, so I could have an error in it, play around with it a bit
 
That worked fine, but


How can I get a total overtime hours worked

Like I want to be able to see the 8 hours worked on day and 8 the next but in another expression have 8 , then 16, then 24

Like a running total that way.

Thank you
 

Users who are viewing this thread

Back
Top Bottom