Hoser
Hoser

Reputation: 5044

MS Access query sum up the values when certain columns match

I have an Access database holding shoot days for commercials and line items tied to each shoot day.

So I'll have something like...

Shoot Day      ......      Total
 Travel                     400
 Travel                     150
 Travel                     200
   1                        350
   1                        275
   2                        850
   2                        500
  ...                       ...

This goes on for a while. I want a query to return something like

Shoot Day      .......     Total
 Travel                     750
   1                        625
   2                       1350
  ...                       ... 

So I'd like it to add up the total column whenever there is a match in the Shoot Day column.

I'd love some help!

Upvotes: 1

Views: 7876

Answers (1)

Fionnuala
Fionnuala

Reputation: 91316

You need something on the lines of:

 SELECT [Shoot Day], Sum([Total])
 FROM Table
 GROUP BY [Shoot Day]

Upvotes: 3

Related Questions