Query totals - grouped

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a query that outputs the following data. I would like to have the
query total the "Time" column for records with the same "Time code" and the
same "Date of work".

Rep. # Date of work Tech: Time Code Time

4 Wednesday, January 19, 11048 100160 0.5
12 Thursday, January 20, 11048 100160 0.5
14 Thursday, January 20, 11048 100160 2.5
19 Friday, January 21, 2005 11048 100160 2.5
22 Monday, January 24, 2005 11048 100260 0.5
18 Friday, January 21, 2005 11048 111010 0.5
3 Wednesday, January 19, 11048 121010 0.5
15 Friday, January 21, 2005 11048 134010 0.5
11 Thursday, January 20, 11048 164010 0.5
 
Try:
SELECT DateOfWork, TimeCode, Sum([Time]) as SumTime
FROM qryNoName
GROUP BY DateOfWork, TimeCode;
 
Thanks a bunch. It works great!

Duane Hookom said:
Try:
SELECT DateOfWork, TimeCode, Sum([Time]) as SumTime
FROM qryNoName
GROUP BY DateOfWork, TimeCode;

--
Duane Hookom
MS Access MVP
--

Bexar1 said:
I have a query that outputs the following data. I would like to have the
query total the "Time" column for records with the same "Time code" and
the
same "Date of work".

Rep. # Date of work Tech: Time Code Time

4 Wednesday, January 19, 11048 100160 0.5
12 Thursday, January 20, 11048 100160 0.5
14 Thursday, January 20, 11048 100160 2.5
19 Friday, January 21, 2005 11048 100160 2.5
22 Monday, January 24, 2005 11048 100260 0.5
18 Friday, January 21, 2005 11048 111010 0.5
3 Wednesday, January 19, 11048 121010 0.5
15 Friday, January 21, 2005 11048 134010 0.5
11 Thursday, January 20, 11048 164010 0.5
 
Back
Top