Reputation: 75
I have an Oracle table looking like this:
+--+--+------+
|DB|NR|Amount|
+--+--+------+
|BE|10|20 |
+--+--+------+
|BE|10|30 |
+--+--+------+
|FR|20|50 |
+--+--+------+
|FR|20|10 |
+--+--+------+
|DE|30|25 |
+--+--+------+
|BE|35|75 |
+--+--+------+
Which query do I need to use to merge all the rows with the same DB and NR?
This should be the result:
+--+--+------+
|DB|NR|Amount|
+--+--+------+
|BE|10|50 |
+--+--+------+
|FR|20|60 |
+--+--+------+
|DE|30|25 |
+--+--+------+
|BE|35|75 |
+--+--+------+
Thx in advance.
Upvotes: 1
Views: 5347