Hi I am new to the types of sql joins and have a very basic issue. I have two tables
The Users table
id | City |
---|---|
1 | San Francisco |
2 | moscow |
3 | london |
4 | washington |
The cities table
city | country |
---|---|
moscow | russia |
san francisco | usa |
washington | usa |
london | england |
selecting the id from the users table, matching it up with it's respective country in the cities table. I want to produce the below table using an SQL select statement:
id | country |
---|---|
1 | USA |
2 | russia |
3 | London |
4 | USA |
so far i have written but have no idea where to continue from there(or if this is even a correct start) as sql joins confuse me slightly
SELECT users.city, cities.city FROM users INNER JOIN cities ON