-
-
Save codecademydev/2cbcd97d9e777984f68b97154ad33832 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 10; | |
select * from population_years limit 10; | |
select count(*) from countries where continent = 'Africa'; | |
select continent, sum(population), year from countries join population_years on countries.id = population_years.country_id where year = 2005 and continent = 'Oceania'; | |
select continent, avg(population), year from countries join population_years on countries.id = population_years.country_id where year = 2003 and continent = 'South America'; | |
select name, min(population), year from countries join population_years on countries.id = population_years.country_id where year = 2007; | |
select name, avg(population) from countries join population_years on countries.id = population_years.country_id where name = 'Poland'; | |
select count(*) from countries where name like 'The %' or name like '% The'; | |
select continent, sum(population), year 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