Algorithm


Problem Name: Sql - Population Density Difference

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

In this HackerRank Functions in SQL problem solution,

Query the difference between the maximum and minimum populations in CITY.

Input Format

The CITY table is described as follows:

 

 

Code Examples

#1 Code Example with SQL

Code - SQL


SELECT MAX(POPULATION) - MIN(POPULATION)
FROM CITY;
Copy The Code & Try With Live Editor
Advertisements

Demonstration


Previous
[Solved] Japan Population in SQL solution in Hackerrank
Next
[Solved] The Blunder in SQL solution in Hackerrank