**Table A :** **Table B:**
ITEMCODE Total QTY ITEMCODE Qty
A 100 A 25
B 50 A 75
C 75 B 10
D 85 B 20
B 30
D 80
D 5
Need to result view :
A 100 = A 25
A 75
How to get this result with SQL function with these two tables