We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- SQL
- Basic Join
- Population Census
- Discussions
Population Census
Population Census
Sort by
recency
|
1479 Discussions
|
Please Login in order to post a comment
FOR MYSQL select SUM(CITY.POPULATION) FROM CITY INNER JOIN COUNTRY ON CITY.COUNTRYCODE = COUNTRY.CODE AND COUNTRY.CONTINENT='Asia'
Given the CITY and COUNTRY tables, query the sum of the populations of all cities where the CONTINENT is 'Asia'.
Note: CITY.CountryCode and COUNTRY.Code are matching key columns.
select sum(city.population) from city join country on CITY.CountryCode=COUNTRY.Code where CONTINENT='ASIA';
SELECT SUM(C.POPULATION) FROM CITY C INNER JOIN COUNTRY CN ON C.COUNTRYCODE=CN.CODE WHERE CN.CONTINENT="ASIA";
select sum(city.population) from city inner join country on city.countrycode = country.code where country.continent = 'Asia';