Aggregate Functions in SQL
This blog will discuss the following aggregate functions in SQL.
- MIN()
- MAX()
- SUM()
- AVG()
- COUNT()
- MIN() Function :
MIN() Function returns the smallest value from the selected column.
Syntax :
SELECT MIN(ColumnName)
FROM TableName
WHERE (Condition) ;
Example :
SELECT MIN(POPULATION) AS MIN_POPULATION
FROM COUNTRY ;
For Free, Demo classes Call: 020-71179559
Registration Link: Click Here!
- MAX() Function :
MAX() Function returns the largest value from the selected column.
Syntax :
SELECT MAX(ColumnName)
FROM TableName
WHERE (Condition) ;
Are you looking to advance your career in data analysis or database management? Look no further than SQL training in Pune!
SQL (Structured Query Language) is the standard language used to communicate with and manage relational databases. In today’s data-driven world, SQL skills are in high demand across industries, making it a valuable skillset to have in your professional arsenal.
Example :
SELECT MAX(POPULATION) AS MAX_POPULATION
FROM COUNTRY ;
- SUM() Function :
SUM() Function returns the sum of numeric values of the selected column.
Syntax :
SELECT SUM(ColumnName)
FROM TableName
WHERE (Condition) ;
For Free, Demo classes Call: 020-71179559
Registration Link: Click Here!
Example :
SELECT SUM(POPULATION) AS SUM_OF_POPULATION
FROM COUNTRY ;
Attention all aspiring data analysts and database administrators in Pune! Are you looking to take your career to the next level? Then join SevenMentor’s comprehensive SQL classes in Pune and gain the skills you need to succeed in the dynamic field of data management.
- AVG() Function :
AVG() Function returns the average of numeric values of the selected column.
Syntax :
SELECT AVG(ColumnName)
FROM TableName
WHERE (Condition) ;
Example :
SELECT AVG(POPULATION) AS AVG_OF_POPULATION
FROM COUNTRY ;
For Free, Demo classes Call: 020-71179559
Registration Link: Click Here!
- COUNT() Function :
COUNT() Function returns the count of numeric values of the selected column.
Syntax :
SELECT COUNT(ColumnName)
FROM TableName
WHERE (Condition) ;
Example :
SELECT COUNT(POPULATION) AS COUNT_OF_POPULATION
FROM COUNTRY ;
Author:-
Aniket Kulkarni
Call the Trainer and Book your free demo Class for SQL now!!!
© Copyright 2021 | Sevenmentor Pvt Ltd.