# SQL Day 1 Given a table ![](https://i.imgur.com/26SaN62.png) Question 1 - Query the number of cities where population is larger than 100,000 answer- Theory- COUNT is an aggregate function in SQL. Aggregate function is the function which takes multiple values as input and return a single value as the query output. ``` Select COUNT(ID) from CITY where POPULATION >100000; ``` Question 2-Query the total population of all cities in CITY where District is California. answer- Here, also the SUM is an Aggregate functions in SQL which returns the sum of values of a column ``` SELECT SUM(Population) FROM CITY WHERE District= 'California'; ``` Question 3-Query the average population for all cities in CITY, rounded down to the nearest integer. answer- To round off a value, ROUND function is used. It is numeric function in SQL answer- ``` SSELECT ROUND(AVG(Population)) from CITY; ```