Following are my two tables; I want the results as illustrated in the third table. How can I do this in MySQL (assuming FULL JOIN)?
table_sales
product_id quantity date
c001 20 2013-09-03
t008 30 2013-09-01
t008 20 2013-09-03
c001 90 2013-09-09
table_returns
product_id quantity date
t008 40 2013-09-08
t008 30 2013-09-01
c001 10 2013-09-03
I want to get result like:
product_id sale_qty return_qty date
c001 20 10 2013-09-03
c001 90 - 2013-09-09
t008 30 30 2013-09-01
t008 20 - 2013-09-01
t008 - 40 2013-09-08