68 470
Assignments Done
Successfully Done
In December 2018

Answer to Question #71129 in Databases | SQL | Oracle | MS Access for Justin Desouza

Question #71129
Database Systems - (Query) I have duplicate invoices and I need to combine the customer balances. How do I write the equation?
Expert's answer
There is a code, which delete duplicate invoices and combine all clear invoices :

delete test_outer.*
from test as test_outer
where exists(
select *
from test as test_inner
where test_inner.invoice = test_outer.invoice
group by invoice
having count(*) > 1
and min(test_inner.id) <> test_outer.id

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions