-
-
Save codecademydev/d6b937aefbf51ae8f8898a3c82db5758 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
-- This is the first query: | |
SELECT DISTINCT year from population_years; | |
-- Add your additional queries below: | |
-- Q4 | |
SELECT * | |
FROM population_years | |
WHERE country='Gabon' | |
ORDER BY population DESC | |
LIMIT 1; | |
--Q5 | |
SELECT * | |
FROM population_years | |
WHERE year = 2005 | |
ORDER BY population ASC | |
LIMIT 10; | |
--Q6 | |
SELECT DISTINCT * | |
FROM population_years | |
WHERE population >= '1000.00000' AND year = 2010; | |
--Q7 | |
SELECT DISTINCT country | |
FROM population_years | |
WHERE country LIKE '%Islands%'; | |
--Q8 | |
SELECT * | |
FROM population_years | |
WHERE country ='Indonesia' | |
ORDER BY year DESC; | |
-- subtract 2010 result from 2000 to get the population differences. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment