Puoi eseguire una sottoquery su ogni tabella per ottenere la somma qty per ciascun cliente e quindi unire i risultati in base all'ide del cliente.g
SELECT a.*, b.*
FROM (
Select customer_id, product, dateofsale, PayMeth1, PayMeth2, SUM(Qty) as Qty
from TableA
Group by customer_id, product, dateofsale, PayMeth1, PayMeth2
) a
JOIN (
Select customer_id, product, dateofsale, PayMeth1, PayMeth2, SUM(Qty) as Qty
from TableB
Group by customer_id, product, dateofsale, PayMeth1, PayMeth2
) b
ON a.customer_id = b.customer_id