Created
April 7, 2020 02:57
-
-
Save Sudhir-KNair/263975ffe26d4e0f2acbc68ff9f3c769 to your computer and use it in GitHub Desktop.
World Population 1
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: | |
-- This is the first query: | |
SELECT DISTINCT year from population_years; | |
-- Add your additional queries below: | |
SELECT * from population_years | |
where country like '%Indonesia%'; | |
select Country,max(population) as 'Largest Population' from population_years | |
where country = 'Gabon'; | |
Select country, population from population_years | |
where year = 2005 | |
order by population ASC | |
limit 10; | |
Select * from population_years | |
where population > 100 and year = 2010; | |
Select count(*) from population_years | |
where country like '%Islands%'; | |
SELECT * from population_years | |
where country like '%Indonesia%'; | |
SELECT population, year FROM population_years | |
WHERE country = 'Indonesia' | |
AND year BETWEEN 2000 AND 2011 | |
ORDER BY year asc; | |
select population - (select population from population_years where country = 'Indonesia' and year = 2000) as 'Difference' from population_years where country = 'Indonesia' and year = 2010; | |
SELECT year, population 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