I have the following tables:
COMPANIES:
company country
A us
B UK
C france
Trades:
seller buyer amount
A B 10
B C 12
I want to get the summary of buying and selling per country. You can assume no transaction within the same country
country sum_buyer sum_seller
us 10
UK 10 12
france 12
How can I do that?