Population Census

Sort by

recency

|

1440 Discussions

|

  • + 0 comments

    SELECT SUM(CITY.POPULATION) FROM CITY JOIN COUNTRY ON CITY.CountryCode = COUNTRY.Code WHERE CONTINENT = 'Asia';

  • + 0 comments

    select sum(city.population) from city join country on city.countrycode = country.code where continent = "Asia"

  • + 0 comments

    select sum(c.population) from city c join country cn on c.CountryCode = cn.Code where cn.continent='Asia';

  • + 0 comments

    I am just trying out LIKE in this code snippet

    SELECT SUM(city.population) FROM city INNER JOIN country ON city.countrycode = country.code WHERE country.continent LIKE '%sia';

  • + 0 comments
    SELECT SUM(POPULATION)
    FROM CITY
    WHERE COUNTRYCODE IN (
        SELECT CODE
        FROM COUNTRY
        WHERE CONTINENT = 'Asia')
    

    we can use the Where statement to match the Country code keys