Here is my table
And here comes my query (Oracle SQL) :
SELECT col_1, sum(col_2)
FROM table
GROUP BY col_1
I then expect to have as result :
But, outcome of this query is :
This is unexpected behavior from my understanding. Indeed, it seems that SQL consider col_3 to calculate result (A, X and A,Y combinations). But, to me, col_3 is not selected so it should not be taken into consideration to group by data.
I may have missed how to proceed with such cases.
Thanks in advance for your help to build up my knowledge :)


