Algorithm


Problem Name: Sql - Revising Aggregations - The Sum Function

Problem Link: https://www.hackerrank.com/challenges/revising-aggregations-sum/problem?isFullScreen=true

In this HackerRank Functions in SQL problem solution,

Query the total population of all cities in CITY where District is California.

Input Format

The CITY table is described as follows:

 

 

Code Examples

#1 Code Example with SQL

Code - SQL


SELECT SUM(POPULATION) FROM CITY
WHERE DISTRICT = 'California';
Copy The Code & Try With Live Editor
Advertisements

Demonstration


Previous
[Solved] Revising the Select Query I in SQL solution in Hackerrank
Next
[Solved] Average Population in SQL solution in Hackerrank