Sum Distinct By Other Column

Viewed 3986

I have a problem with PL/SQL since i am new in PL/SQL world. Let's say i have table like this.

COlumnA  COlumnB    COlumnC
1      5000000000   X
1      5000000000   X
2      4350000000   X
2      4350000000   X
3      10000000000  X
3      10000000000  X
3      10000000000  X
4      1809469720   Y
5      10000000000  X
5      10000000000  X
6      3000000000   X
6      3000000000   X

And i want to produce select statement as below.

ColumnC |Sum
X       |32350000000
Y       |1809469720

I have solved this problem in Oracle 12c with inner query, but when the system need to go to Oracle 11g, my query doesn't work anymore, i need to have the expected result with only one select statement.

Could anyone please advise?

Thank you!

3 Answers
Related