World Populations II Challenge Project (SQL)

Here is my solution:
I know is not perfect, but I got all the answers:

select *
from countries;

select *
from population_years;

select count(*)
from countries
where continent = ‘Africa’;

SELECT continent, year, sum(population)
FROM countries
JOIN population_years
WHERE countries.id = population_years.country_id
GROUP by continent,
year = 2005;

SELECT continent, year, avg(population)
FROM countries
JOIN population_years
WHERE countries.id = population_years.country_id
Group by continent,
year = 2003;

SELECT name, year, min(population)
FROM countries
JOIN population_years
WHERE countries.id = population_years.country_id
Group by year = 2007;

SELECT name, avg(population)
FROM countries
JOIN population_years
WHERE countries.id = population_years.country_id
Group by name = ‘Poland’;

SELECT *
FROM countries
WHERE name like ‘%The%’;

SELECT continent, year, sum(population)
FROM countries
JOIN population_years
WHERE countries.id = population_years.country_id
Group by continent,
year = 2010;

Hello! Here are my solutions too :slight_smile:

That was a really fun challenge. Thank you! Here are my results.

this is my solution

any feedback welcome!

Below are my solutions to the World Populations II practice.

Here are my answers! Hopefully you find them helpful. :slight_smile:

So, here is my solution to this project.
Please review and let me know if there is anything to be changed. TIA!

Here is my code. Fun project!

I did the first Populations project earlier today, and this time I decided to experiment a little more and fine tune the queries.

This is my code:

Hi everyone, here I share my solution:

I have noticed that most of you dont call the columns with the table name at the beggining, as “countries.continent” and just calling “continent” seems to work fine.
On wich cases should I add the table name as well?

Any feedback is very welcome, thanks!

Here are my solutions! Did anyone else have trouble getting the Code Academy sql to load in DB Browser? I was asked for an encryption key.

Hi! i’d like to know how can i set up on GitHub on debian 9 system.
thanks for your answer :slightly_smiling_face:

Fairly straight forward solutions I think, nothing crazy.

Wow incredible
Seo-Yun

Hey! Here are my answers.

I think I got over excited with the WITH clause, and I think it might not be the cleanest/clearest way to code and redact.

Any advice on how to make it better (or, at least, more clear)?

Love the variety we see here. I tried this with and without the ‘WITH/ AS’ operator and kept it in the end. Not sure if it’s efficient code or not.