Skip to content
Advertisement

group some row in resilt table

I need get a group some row select from result table. I’ve written select but have error message ORA-00913. How to write a correct select ?I have a result table:

and insert:

and I need to get result table:

I’m trying:

but ora-00913 too many values

How to write correct “select” ?

Sorry, There is some new conditions. The table can contain rows with the same Document_number and different ID_customer. This rows must not to add up summarize.

Example:

1 input_saldo 111222 300 2 input_saldo 222333 600 4 ouput_saldo 444555 600 3 ouput_saldo 333444 400 11 TN0001 333444 600 –!!!!!!! 5 TN0001 444555 600 –!!!!!!! 6 TN0002 444555 700 ……

And I try execute:

Return result is:

DOCUMENT_NUMBER ID_CUSTOMER SUM(BASE_AMOUNT)

But I need:

Advertisement

Answer

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement