7 - SQL Aggregation functions

 


Aggregation Functions

Avg()       :     Returns the average value from specified columns

Count()  :      Returns number of table rows

Max()     :     Returns largest value among the records

Min()      :    Returns smallest value among the records

Sum()     :   Returns the sum of specified column values

...........................................................

                                  ORIGINAL LIST



Find the maximum salary out of the list using SQL Aggregation Functions


select  max(salary)from employees ;



Find the minimum salary out of the list using SQL Aggregation Functions


select  min(salary)from employees ;



Find the average salary  of the list using SQL Aggregation Functions


select  avg(salary)from employees ;



Find the sum of salary  of the list using SQL Aggregation Functions


select  sum(salary)from employees ;


Find the count of the list using SQL Aggregation Functions


select  count(salary)from employees ;



Comments

Popular posts from this blog

5 - DML commands used in MySQL WorkBench

INDEX OF Zeek MySQL

4 - DDL commands used in MySQL Workbench