sum values from the same item in a single column?

P

pemt

Hi,

I have a query to get a table like this:
Item Num Values
A 1 10
A 2 22
A 3 78
B 1 32
B 2 40
B 3 87
C 1 34
C 2 76
C 3 98
actually each "Item" has more than a thousand of "Num".
how to sum all "Item" (A+B+C) at each "Num"?
Like:
Num Sum
1 76
2 138
3 263

Thanks!

pemt
 
K

KARL DEWEY

Maybe I am not following what you want but just drop Item from the query like
this --
SELECT Num, Sum([Values]) AS Total_Values
FROM YourTable
GROUP BY Num;
 
P

pemt

Hi Karl,

Thanks a lot!

pemt

KARL DEWEY said:
Maybe I am not following what you want but just drop Item from the query like
this --
SELECT Num, Sum([Values]) AS Total_Values
FROM YourTable
GROUP BY Num;


--
Build a little, test a little.


pemt said:
Hi,

I have a query to get a table like this:
Item Num Values
A 1 10
A 2 22
A 3 78
B 1 32
B 2 40
B 3 87
C 1 34
C 2 76
C 3 98
actually each "Item" has more than a thousand of "Num".
how to sum all "Item" (A+B+C) at each "Num"?
Like:
Num Sum
1 76
2 138
3 263

Thanks!

pemt
 

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