I am working on a project where i give the customers an invoice to buy some items from a store
after a while the seller there bring to me several invoices and here I need to collect them and calculate the quantity of items and put price for every item because the price is different every time and then
calculate the total and assign this big invoice to this supplier.
I have 3 tables
invoice, invoice details, payment invoice(to assign invoices to the payment), (table to make the calculation and payment and to assign it to reseller)
I have problem to do select statement that selects the all unique items in the collected invoices under the payment invoice table. can anyone help with this