SELECT ID, SUM(Amount) total
FROM
(
SELECT ID, Amount FROM A
UNION ALL
SELECT ID, AMount FROM B
) s
GROUP BY ID
आप क्वेरी के परिणाम के आधार पर एक टेबल बेस बना सकते हैं।
CREATE TABLE C
AS
SELECT ID, SUM(Amount) total
FROM
(
SELECT ID, Amount FROM A
UNION ALL
SELECT ID, AMount FROM B
) s
GROUP BY ID;