-
-
Save codecademydev/4da9f28c0133440e93fd37a92eddad4c to your computer and use it in GitHub Desktop.
Codecademy export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select * from countries limit 5; | |
select * from population_years limit 5; | |
select count(*) from countries where continent like 'Africa'; | |
select sum(population) from countries join population_years on countries.id = population_years.country_id where continent = 'Oceania' and year = '2005' group by continent; | |
select avg(population) from countries join population_years on countries.id = population_years.country_id where continent = 'South America' and year = 2003; | |
select countries.name, min(population) from countries join population_years on countries.id = population_years.country_id where year = 2007; | |
select avg(population) from countries join population_years on countries.id = population_years.country_id where name = 'Poland'; | |
select count(distinct name) from countries where name like '%The%'; | |
select continent, sum(population) from countries join population_years on countries.id = population_years.country_id where year = 2010 group by continent ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment