Skip to content

Instantly share code, notes, and snippets.

View stryke4711's full-sized avatar

stryke4711

  • Vienna, AT
View GitHub Profile
@stryke4711
stryke4711 / gist:9fabc78d308796eab9d50f8c93231c22
Created June 25, 2020 15:03
World Populations II Excercise
-- how many entries in the table are from africa?
select continent, count(*) as 'no. of countries' from countries
WHERE continent = 'Africa';
-- what was the total population of the continent of oceania in 2005?
select continent, sum(population) as 'total population' from population_years
join countries
on countries.id = population_years.country_id