Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created September 20, 2020 02:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecademydev/4b79f8c71d25a2b0ac34cb5c3cd88a9f to your computer and use it in GitHub Desktop.
Save codecademydev/4b79f8c71d25a2b0ac34cb5c3cd88a9f to your computer and use it in GitHub Desktop.
Codecademy export
-- This is the first query:
SELECT DISTINCT year from population_years;
-- Add your additional queries below:
select max(population) [gabon_pop]
from population_years
where country = 'Gabon';
select country
from population_years
where year = '2005'
order by population asc
limit 10;
select distinct country
from population_years
where population > 100
and year = '2010';
select count(*) [island_countries]
from population_years
where country like '%Islands%';
select (select population from population_years where country='Indonesia' and year='2010') - (select population from population_years where country='Indonesia' and year='2000') [indo_diff];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment