shakad72 / group-7-gc

Software Engineering Methods Coursework Assessment
Apache License 2.0
0 stars 0 forks source link

As a user, I want to retrieve the population of people, people living in cities, and people not living in cities in each country so that I can analyze the urbanization trends and demographic distribution across countries #25

Closed shakad72 closed 8 months ago

shakad72 commented 8 months ago

SQL: select Name as Country , sum(Population) as TotalPopulation, (select sum(city.Population) from city inner join country on city.CountryCode = country.Code where country.Name=c.Name) as UrbanPopulation, round((select sum(city.Population) from city inner join country on city.CountryCode = country.Code where country.Name=c.Name)/sum(Population)100,2) as UrbanPopulation%, (sum(c.Population) - (select sum(city.Population) from city inner join country on city.CountryCode = country.Code where country.Name=c.Name)) as RuralPopulation, round((select(sum(c.Population) - (select sum(city.Population) from city inner join country on city.CountryCode = country.Code where country.Name=c.Name))/sum(Population)100),2) as RuralPopulation% from country c group by Name ;

Parameters: None

shakad72 commented 8 months ago

Added report25.xml to feature/reports branch