sum values from the same item in a single column?

  • Thread starter Thread starter pemt
  • Start date Start date
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
 
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;
 
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
 
Back
Top