Search results
Hello coders, today we are going to solve Average Population of Each Continent HackerRank Solution in SQL. Given the CITY and COUNTRY tables, query the names of all the continents (COUNTRY.Continent) and their respective average city populations (CITY.Population) rounded down to the nearest integer.
Print the name of all continents (key: Country.Continent) along with the average City population rounded down to nearest integer.
Effective solutions to hackerrank.com practice problems in C++, python and SQL - IhorVodko/Hackerrank_solutions
/* Given the CITY and COUNTRY tables, query the names of all the continents (COUNTRY.Continent) and their respective average city populations (CITY.Population) rounded down to the nearest integer. */ SELECT country.continent, FLOOR (AVG (city.population)) FROM country INNER JOIN city ON country.code = city.countrycode GROUP BY country.continent;
Query the names of all continents and their respective city populations, rounded down to the nearest integer.
May 22, 2022 · Given the CITY and COUNTRY tables, query the names of all the continents (COUNTRY.Continent) and their respective average city populations (CITY.Population) rounded down to the nearest...
Since the population column in the city table has populations city wise but the question asks us to get the population of continents.
/* Working Platform:- MySQL, Oracle, MS SQL Server */ SELECT COUNTRY.CONTINENT, FLOOR (AVG (CITY.POPULATION)) FROM CITY INNER JOIN COUNTRY ON CITY.COUNTRYCODE = COUNTRY.CODE GROUP BY COUNTRY.CONTINENT; HackerRank concepts & solutions. Contribute to BlakeBrown/HackerRank-Solutions development by creating an account on GitHub.
Aug 21, 2023 · A lesson that teaches you how to solve the following problem from the SQL section in HackerRank. https://www.hackerrank.com/challenges/average-population-of-...
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. The CITY and COUNTRY tables are described as follows: