/population_queries.sqlite Secret
Created
September 19, 2020 12:38
Star
You must be signed in to star a gist
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: | |
SELECT ROUND(MAX(population),2) AS "Largest population size for Gabon" | |
FROM population_years | |
WHERE country LIKE "Gabon"; | |
SELECT country AS "Countries with the lowest population countries in 2005" | |
FROM population_years | |
WHERE year=2005 | |
ORDER BY population | |
LIMIT 10; | |
SELECT DISTINCT country AS "Countries with a population of over 100 million in the year 2010", ROUND(population,2) AS "Population" | |
FROM population_years | |
WHERE year=2010 AND population > 100; | |
SELECT COUNT(*) AS "Number of countries with the word “Islands” in their name" | |
FROM population_years | |
WHERE country LIKE "%_slands%"; | |
SELECT year, population AS "Population of Indonesia" | |
FROM population_years | |
WHERE country LIKE "Indonesia" AND year=2000 OR year=2010 and country LIKE "Indonesia" ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment