Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Codecademy export
SELECT * FROM countries WHERE name = 'Africa';
SELECT SUM(population_years.population) AS 'Total',population_years.year,countries.continent FROM population_years CROSS JOIN countries WHERE population_years.year = 2005 AND countries.continent = 'Oceania';
SELECT AVG(population_years.population) AS 'Average',population_years.year,countries.continent FROM population_years CROSS JOIN countries WHERE population_years.year = 2003 AND countries.continent = 'South Amercia';
SELECT MIN(population_years.population),population_years.year,countries.name FROM population_years CROSS JOIN countries WHERE population_years.year = 2007;
SELECT AVG(population_years.population),population_years.year,countries.name FROM population_years CROSS JOIN countries WHERE countries.name = 'Poland';
SELECT countries.name FROM countries WHERE countries.name LIKE 'The%';
SELECT population_years.population AS 'Total',population_years.year,countries.continent FROM population_years CROSS JOIN countries WHERE population_years.year = 2010 GROUP BY continent;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.