Count Query for newbie (1 Viewer)

ironvid

Registered User.
Local time
Today, 19:35
Joined
Aug 14, 2003
Messages
18
Hi

I know this should be simple But I just can't get my head round it!.

I have a table which stores information on files:

[ID]
[Files]
[Boxes]
[Count]

ID FileNo BoxNo Count
2 123456 Box1 10
3 654321 Box1 15
4 258852 Box1 25
5 654456 Box2 20
6 753357 Box2 10
7 951159 Box2 10

I want a query to give me a list of boxes with a total count e.g.

Box1 - 50
Box2 - 40

I have attached a sample!

Thanks In Advance

Stephen
 

Attachments

Stephen,

First point is to change the name of the Count field. "Count" is a Reserved Word (i.e. has a special meaning) in Access, and as such should not be used as the name of a field or control.

The SQL view of the query you need is:
SELECT BoxNo, Sum([Count]) AS HowMany
FROM NameOfYourTable
GROUP BY BoxNo
 

Users who are viewing this thread

Back
Top Bottom