I have two tables, both with a column called transaction_amnt. Is there a way I can write a SQL query that returns the sum of all of the transaction amounts in both tables? I tried
select sum(transaction_amnt) from table1 natural join table2;
but, I’m thinking that join isn’t really what I want here.
I guess
union allbest fits to your question as it will not remove duplicates on the records.