Summ by date and unit

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.
 
G

Gerald Stanley

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top