Why won't this code do anything?

I am doing this challenge project with SQL: https://www.codecademy.com/practice/projects/world-populations-sql-practice-ii. I am not asking for the answer to this question, but I am wondering why this query:

select *
from countries
where continent = 'Oceania'
left join population_years 
  on population_years.country_id = countries.id;

Will not print anything.
Thank you!

SQL expects your statements to be in a specific order, and it evaluates the entire query in a specific order.

Are your statements in the correct order here?

LEFT JOIN ... ON ...


Yes, I think they are!

1 Like

So, you think a LEFT JOIN (or any JOIN for that matter) comes after the WHERE clause? :thinking:

1 Like

Oh, I thought you were telling me that was the order. No, I looked it up, and where comes after join. Thank you!