Hello, Please need your help.
I have 3 tables.
* Product_Table (id_product, product_name)
* Sold_Items (id_product, quantity, date_sold)
* Returned_Items (id_product, quantity, date_returned)
how can I query in order to get results like:
id_product / product_name / sum(sold_quantity) / sum(Returned_quantity) / net_amount (sold minus returnet quantity)
1 / Notebook / 50 / 10 / 40
each query sum for sold and returned quantity has to be parametized by different dates. (date_sold, date_returned)
Thanks in advance.
Jon