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
|
1489 Discussions
|
Please Login in order to post a comment
SELECT SUM(C.POPULATION) FROM CITY C JOIN COUNTRY CO ON C.COUNTRYCODE = CO.CODE WHERE CONTINENT IN ('Asia')
select sum(c.population) from city c join country co on c.countrycode =co.code where continent = 'Asia'
MySQL
Method 1: SELECT SUM(C.Population) AS Total_Population FROM City C JOIN Country CO ON C.CountryCode = CO.Code WHERE CO.Continent = 'Asia';
Method 2: SELECT SUM(C.Population) AS Total_Population FROM City C INNER JOIN Country CO ON C.CountryCode = CO.Code WHERE CO.Continent = 'Asia';
select sum(c1.population) from city as c1 join country as c2 on c1.CountryCode = c2.Code where continent = 'asia'
SELECT SUM(CITY.POPULATION) FROM CITY LEFT JOIN COUNTRY ON CITY.COUNTRYCODE = COUNTRY.CODE GROUP BY COUNTRY.CONTINENT HAVING COUNTRY.CONTINENT = 'ASIA';