Skip to Main Content

Group by preserving the order

jeneeshNov 29 2006 — edited Jan 5 2011

Say for eg: my data is like this

--order by col3
col1 col2  col3
1       5     1
1      10    2
2      2      3 
2      5      4
1     15     5
I hav to get o/p as
col1  sum_col2
1       15
2       7
1      15
I have to group by preserving the order
Pls give me suggestions..

jeneesh                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked due to inactivity on Feb 2 2011
Added on Nov 29 2006
9 comments
13,823 views