Skip to content

Instantly share code, notes, and snippets.

View Sudhir-KNair's full-sized avatar

SudheerN Sudhir-KNair

  • United States
View GitHub Profile
@Sudhir-KNair
Sudhir-KNair / World Population 1
Created April 7, 2020 02:57
World Population 1
-- 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;
@Sudhir-KNair
Sudhir-KNair / gist:2de0aa4ff43c4b2084c115d03ace0a58
Last active April 6, 2020 23:34
Codeacademy world population
select count(*) FROM countries
where continent like '%africa%';
select continent,round(sum(population),2) as 'Total Population' from population_years
join
countries
on countries.id = population_years.country_id
where continent like '%Oceania%' AND year = 2005
group by continent;