Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created July 10, 2020 11:33
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/61a40e4680f3a1f05bd5ad4f7c84d0d3 to your computer and use it in GitHub Desktop.
Save codecademydev/61a40e4680f3a1f05bd5ad4f7c84d0d3 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:
--Problem 4
select *
from population_years
where country = 'Gabon'
order by population DESC;
--Problem 5
select *
from population_years
where year = 2005
order by population
limit 10;
--Problem 6
select distinct country
from population_years
where population > 100
and year = 2010;
--Problem 7
select *
from population_years
where country like '%Islands%';
--Problem 8
select *
from population_years
where country = 'Indonesia'
and year = 2000
or
country = 'Indonesia'
and
year = 2010;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment