Algorithm


Problem Name: Sql - Average Population

Problem Link: https://www.hackerrank.com/challenges/average-population/problem?isFullScreen=true

In this HackerRank Functions in SQL problem solution,

Query the average population for all cities in CITY, rounded down to the nearest integer.

Input Format

The CITY table is described as follows:

 

 

Code Examples

#1 Code Example with SQL

Code - SQL


SELECT FLOOR(AVG(POPULATION))
FROM CITY;
Copy The Code & Try With Live Editor
Advertisements

Demonstration


Previous
[Solved] Revising Aggregations - The Sum Function in SQL solution in Hackerrank
Next
[Solved] Japan Population in SQL solution in Hackerrank