I have 2 tables with the same columns. however, one table contains BUY data while the other contains SELL data. The first column of the table is the ID, and the number of rows of the tables might not be the same. How do I add the values of the columns in 2 tables if the values of the ID are the same? For example, I want to add tableA and tableB and the output is tableC
tableA tableB
ID Qty ID Qty
ABC 100 ABC 90
XZY 100 TOM 60
TOM 100 ROB 40
AL 100
tableC
ID Qty
ABC 190
XYZ 100
TOM 160
AL 100
ROB 40