Summ by date and unit

  • Thread starter Thread starter Mick Horan
  • Start date Start date
M

Mick Horan

Hi,
I have a table that has the following structure:
DATE, UNIT, SHIFT, FLDA, FLDB, FLDC.
5/1/4 XX 1ST 3 2 4
5/1/4 XX 2ND 1 6 2

5/2/4 XX 1ST 4 1 4

5/3/4 XX 1ST 3 2 1
5/3/4 XX 2ND 4 1 2
5/3/4 XX 3RD 2 2 4

I need to create a query that will summarize by date and unit and ignore the
shift data. The result would look like this.
DATE, UNIT, SHIFT, FLDA, FLDB, FLDC.
5/1/4 XX 4 8 6

5/2/4 XX 4 1 4

5/3/4 XX 9 5 7

Can I do this is a single query?

Thanks for the help.
 
Try something along the lines of
SELECT [Date], [Unit], Sum(FLDA), Sum(FLDB), Sum(FLDC)
FROM YourTableName
GROUP BY [Date], [Unit]

Hope This Helps
Gerald Stanley MCSD
 
Back
Top