[Raw data]
A B C
1 10 1
1 10 2
2 20 3
2 20 4
1 100 5
1 100 6
[Wanted result]
A SUM_OF_B
1 20
2 40
1 200
It's unuseful that the query has the simple 'group by' clause and 'dense_rank over partition by' because grouping works all rows. However I want grouping in state of ordering. How do I write the proper query?