Hello good people,
I have a database with 8 tables. Each table has a column called "Country", and then some other columns like Population or GDP or whatever (depending on the table).
Now the problem is, not all tables have exactly the same list and order or countries. Some have less, some more.
I need to put together all this data in one table. I need a query that will return data based on the column "Country" across all tables. I can't find a way to get unions to do that.
Any suggestions? Have I been able to explain myself?
Thanks!
EDIT: Here's a picture of 4 tables to explain my point
<a href="https://drive.google.com/file/d/1F0YxG6c6rcLE3d9GIFnmXcjfYl3THwTm/view?usp=sharing"">EXAMPLE.png - Google Drive
What I have tried:
I've tried a select across all tables, but it's not working.