SQL Grouping Problem
Posted: Tue Jul 17, 2007 2:44 am
Dear SQL Champs,
I have two columns like this
Id column a column b
1 a 10000
2 z 20000
3 i 30000
4 z 40000
5 p 50000
6 d 60000
7 a 70000
8 p 80000
9 i 90000
Find the query which will sum the column b, group by column a without disturbing the sequence
Out put should be as follows
A 80000
Z 60000
I 12000
P 13000
D 6000
I have two columns like this
Id column a column b
1 a 10000
2 z 20000
3 i 30000
4 z 40000
5 p 50000
6 d 60000
7 a 70000
8 p 80000
9 i 90000
Find the query which will sum the column b, group by column a without disturbing the sequence
Out put should be as follows
A 80000
Z 60000
I 12000
P 13000
D 6000