SlideShare a Scribd company logo
AGGREGATE FUNCTION
PREPARED BY
MS.G.ABIRAMI – III - B.SC - INFORMATION TECHNOLOGY
UNDER THE GUIDANCE OF
MRS.P.ANUSHA M.SC(IT).,M.PHIL.,D.P.T.T.,(PH.D).,
ASSISTANT PROFESSOR,
DEPARTMENT OF INFORMATION TECHNOLOGY,
BON SECOURS COLLEGE FOR WOMEN,
THANJAVUR.
SQL AGGREGATE FUNCTION
 SQL aggregation function is used to perform the calculation
on multiple rows of a single column of a table. It returns a
single value.
 It is also used to summarize the data.
 This function ignore the null values except the count
function .
TYPES OF SQL AGGREGATION FUNCTION
Count ( ) : Returns the numbers of rows
Sum ( ) : Returns the sum
Avg ( ) : Returns the average value
Max ( ) : Returns the smallest value
Min ( ) : Returns the largest value
COUNT FUNCTION
Count function is used to count the number of rows in database table
.It can work on both numeric and non-numeric data types.
Count function uses the count (*) that returns the count of all the
rows in a specific table. Count (*) considers duplicate and null .
This function does not count the null value .
Table name :Employee
EXAMPLE :TABLE
NAME DATE PAGES
RAMU 22022-01-12 34
GEETHA 22022-01-12 74
SEETHA 22022-01-12 64
RAM 22022-01-12 94
SUKRIA 22022-01-12 64
SYNTAX OF COUNT
Syntax: select count(Pages) from employee;
Count (pages)
5
1 row in set
Syntax: select count (name) from employee;
Count(name)
5
1 row in set
SUM FUNCTION
• Sum() function is an aggregate function that calculates the sum of
all or distinct values in an expression .
SYNTAX: SELECT SUM (PAGES) FROM EMPLOYEE;
SUM(PAGES)
330
1 ROW IN A SET
AVERAGE FUNCTION
• The avg function is used to calculate the average value of the
numeric type. Average function returns the average of all non-null
values.
syntax: select avg (pages)from employee;
avg(pages)
66.0000
1row in set
MAX FUNCTION
• Max function is used to find the maximum value of certain column.
This function determines the largest value of all selected values of
columns.
Syntax: select max (pages) from employee;
Max(pages)
94
1 row in set
MIN FUNCTION
• The Min function is used to find the minimum value of certain
column. This function determines the smallest value of all selected
values of a column.
syntax: Select min(pages)from employee ;
Min(pages)
34
1 row in set

More Related Content

What's hot

Aggregate function
Aggregate functionAggregate function
Aggregate function
Rayhan Chowdhury
 
SQL subquery
SQL subquerySQL subquery
SQL subquery
Vikas Gupta
 
database language ppt.pptx
database language ppt.pptxdatabase language ppt.pptx
database language ppt.pptx
Anusha sivakumar
 
Sql joins
Sql joinsSql joins
Sql joins
Gaurav Dhanwant
 
SQL Joins.pptx
SQL Joins.pptxSQL Joins.pptx
SQL Joins.pptx
Ankit Rai
 
SQL Join Basic
SQL Join BasicSQL Join Basic
SQL Join Basic
Naimul Arif
 
Create table
Create tableCreate table
Create table
Nitesh Singh
 
SQL Queries
SQL QueriesSQL Queries
SQL Queries
Nilt1234
 
Join query
Join queryJoin query
Join query
Waqar Ali
 
Sql joins inner join self join outer joins
Sql joins inner join self join outer joinsSql joins inner join self join outer joins
Sql joins inner join self join outer joins
Deepthi Rachumallu
 
Sql subquery
Sql  subquerySql  subquery
Sql subquery
Raveena Thakur
 
Basic SQL and History
 Basic SQL and History Basic SQL and History
Basic SQL and History
SomeshwarMoholkar
 
Sql(structured query language)
Sql(structured query language)Sql(structured query language)
Sql(structured query language)
Ishucs
 
Types Of Join In Sql Server - Join With Example In Sql Server
Types Of Join In Sql Server - Join With Example In Sql ServerTypes Of Join In Sql Server - Join With Example In Sql Server
Types Of Join In Sql Server - Join With Example In Sql Server
programmings guru
 
Oracle: Joins
Oracle: JoinsOracle: Joins
Oracle: Joins
oracle content
 
Chapter 4 Structured Query Language
Chapter 4 Structured Query LanguageChapter 4 Structured Query Language
Chapter 4 Structured Query Language
Eddyzulham Mahluzydde
 
Complex queries in sql
Complex queries in sqlComplex queries in sql
Complex queries in sql
Charan Reddy
 
MS Sql Server: Joining Databases
MS Sql Server: Joining DatabasesMS Sql Server: Joining Databases
MS Sql Server: Joining Databases
DataminingTools Inc
 

What's hot (20)

Aggregate function
Aggregate functionAggregate function
Aggregate function
 
SQL subquery
SQL subquerySQL subquery
SQL subquery
 
Joins And Its Types
Joins And Its TypesJoins And Its Types
Joins And Its Types
 
database language ppt.pptx
database language ppt.pptxdatabase language ppt.pptx
database language ppt.pptx
 
Sql joins
Sql joinsSql joins
Sql joins
 
SQL Joins.pptx
SQL Joins.pptxSQL Joins.pptx
SQL Joins.pptx
 
SQL Join Basic
SQL Join BasicSQL Join Basic
SQL Join Basic
 
Create table
Create tableCreate table
Create table
 
SQL Queries
SQL QueriesSQL Queries
SQL Queries
 
Join query
Join queryJoin query
Join query
 
Sql joins inner join self join outer joins
Sql joins inner join self join outer joinsSql joins inner join self join outer joins
Sql joins inner join self join outer joins
 
SQL Views
SQL ViewsSQL Views
SQL Views
 
Sql subquery
Sql  subquerySql  subquery
Sql subquery
 
Basic SQL and History
 Basic SQL and History Basic SQL and History
Basic SQL and History
 
Sql(structured query language)
Sql(structured query language)Sql(structured query language)
Sql(structured query language)
 
Types Of Join In Sql Server - Join With Example In Sql Server
Types Of Join In Sql Server - Join With Example In Sql ServerTypes Of Join In Sql Server - Join With Example In Sql Server
Types Of Join In Sql Server - Join With Example In Sql Server
 
Oracle: Joins
Oracle: JoinsOracle: Joins
Oracle: Joins
 
Chapter 4 Structured Query Language
Chapter 4 Structured Query LanguageChapter 4 Structured Query Language
Chapter 4 Structured Query Language
 
Complex queries in sql
Complex queries in sqlComplex queries in sql
Complex queries in sql
 
MS Sql Server: Joining Databases
MS Sql Server: Joining DatabasesMS Sql Server: Joining Databases
MS Sql Server: Joining Databases
 

Similar to AGGREGATE FUNCTION.pptx

database_set_operations_&_function.pptx
database_set_operations_&_function.pptxdatabase_set_operations_&_function.pptx
database_set_operations_&_function.pptx
tanvirkhanfahim
 
Advance excel
Advance excelAdvance excel
Advance excel
SiddheshHadge
 
count^J Product^J functions.pptx
count^J Product^J functions.pptxcount^J Product^J functions.pptx
count^J Product^J functions.pptx
MdAquibRazi1
 
Sql FUNCTIONS
Sql FUNCTIONSSql FUNCTIONS
Sql FUNCTIONS
Abrar ali
 
PHP mysql Aggregate functions
PHP mysql Aggregate functionsPHP mysql Aggregate functions
PHP mysql Aggregate functions
Mudasir Syed
 
Using Excel Functions
Using Excel FunctionsUsing Excel Functions
Using Excel Functions
Gautam Gupta
 
SQL Functions and Operators
SQL Functions and OperatorsSQL Functions and Operators
SQL Functions and Operators
Mohan Kumar.R
 
Introduction to oracle functions
Introduction to oracle functionsIntroduction to oracle functions
Introduction to oracle functions
Nitesh Singh
 
Key functions in_oracle_sql
Key functions in_oracle_sqlKey functions in_oracle_sql
Key functions in_oracle_sqlpgolhar
 
2. mathematical functions in excel
2. mathematical functions in excel2. mathematical functions in excel
2. mathematical functions in excel
Dr. Prashant Vats
 
Structured query language(sql)
Structured query language(sql)Structured query language(sql)
Structured query language(sql)
Huda Alameen
 
Oracle_Analytical_function.pdf
Oracle_Analytical_function.pdfOracle_Analytical_function.pdf
Oracle_Analytical_function.pdf
KalyankumarVenkat1
 
it skill excel sheet for ppt.pptx
it skill excel sheet for ppt.pptxit skill excel sheet for ppt.pptx
it skill excel sheet for ppt.pptx
MdAquibRazi1
 
ADV Powepoint 3 Lec.pptx
ADV Powepoint 3 Lec.pptxADV Powepoint 3 Lec.pptx
ADV Powepoint 3 Lec.pptx
ArjayBalberan1
 
sql functions3 (1).pdf
sql functions3 (1).pdfsql functions3 (1).pdf
sql functions3 (1).pdf
Usha570012
 

Similar to AGGREGATE FUNCTION.pptx (20)

database_set_operations_&_function.pptx
database_set_operations_&_function.pptxdatabase_set_operations_&_function.pptx
database_set_operations_&_function.pptx
 
Advance excel
Advance excelAdvance excel
Advance excel
 
Mysql1
Mysql1Mysql1
Mysql1
 
count^J Product^J functions.pptx
count^J Product^J functions.pptxcount^J Product^J functions.pptx
count^J Product^J functions.pptx
 
Sql FUNCTIONS
Sql FUNCTIONSSql FUNCTIONS
Sql FUNCTIONS
 
Mysqlppt
MysqlpptMysqlppt
Mysqlppt
 
Introduction to Oracle Functions--(SQL)--Abhishek Sharma
Introduction to Oracle Functions--(SQL)--Abhishek SharmaIntroduction to Oracle Functions--(SQL)--Abhishek Sharma
Introduction to Oracle Functions--(SQL)--Abhishek Sharma
 
PHP mysql Aggregate functions
PHP mysql Aggregate functionsPHP mysql Aggregate functions
PHP mysql Aggregate functions
 
Mysqlppt
MysqlpptMysqlppt
Mysqlppt
 
Using Excel Functions
Using Excel FunctionsUsing Excel Functions
Using Excel Functions
 
SQL Functions and Operators
SQL Functions and OperatorsSQL Functions and Operators
SQL Functions and Operators
 
Introduction to oracle functions
Introduction to oracle functionsIntroduction to oracle functions
Introduction to oracle functions
 
Key functions in_oracle_sql
Key functions in_oracle_sqlKey functions in_oracle_sql
Key functions in_oracle_sql
 
2. mathematical functions in excel
2. mathematical functions in excel2. mathematical functions in excel
2. mathematical functions in excel
 
Sql wksht-3
Sql wksht-3Sql wksht-3
Sql wksht-3
 
Structured query language(sql)
Structured query language(sql)Structured query language(sql)
Structured query language(sql)
 
Oracle_Analytical_function.pdf
Oracle_Analytical_function.pdfOracle_Analytical_function.pdf
Oracle_Analytical_function.pdf
 
it skill excel sheet for ppt.pptx
it skill excel sheet for ppt.pptxit skill excel sheet for ppt.pptx
it skill excel sheet for ppt.pptx
 
ADV Powepoint 3 Lec.pptx
ADV Powepoint 3 Lec.pptxADV Powepoint 3 Lec.pptx
ADV Powepoint 3 Lec.pptx
 
sql functions3 (1).pdf
sql functions3 (1).pdfsql functions3 (1).pdf
sql functions3 (1).pdf
 

More from Anusha sivakumar

deadline.pptx
deadline.pptxdeadline.pptx
deadline.pptx
Anusha sivakumar
 
Evolution of Computers ppt.pptx
Evolution of Computers ppt.pptxEvolution of Computers ppt.pptx
Evolution of Computers ppt.pptx
Anusha sivakumar
 
PURPOSE OF DATABASE final.pptx
PURPOSE OF DATABASE final.pptxPURPOSE OF DATABASE final.pptx
PURPOSE OF DATABASE final.pptx
Anusha sivakumar
 
fundamental relation algebra.pptx
fundamental relation algebra.pptxfundamental relation algebra.pptx
fundamental relation algebra.pptx
Anusha sivakumar
 
DBMS ARCHITECTURE.pptx
DBMS ARCHITECTURE.pptxDBMS ARCHITECTURE.pptx
DBMS ARCHITECTURE.pptx
Anusha sivakumar
 
Database user and administrator.pptx
Database user and administrator.pptxDatabase user and administrator.pptx
Database user and administrator.pptx
Anusha sivakumar
 
CSS
CSSCSS
Greedy method
Greedy methodGreedy method
Greedy method
Anusha sivakumar
 
Heap sort
Heap sortHeap sort
Heap sort
Anusha sivakumar
 

More from Anusha sivakumar (9)

deadline.pptx
deadline.pptxdeadline.pptx
deadline.pptx
 
Evolution of Computers ppt.pptx
Evolution of Computers ppt.pptxEvolution of Computers ppt.pptx
Evolution of Computers ppt.pptx
 
PURPOSE OF DATABASE final.pptx
PURPOSE OF DATABASE final.pptxPURPOSE OF DATABASE final.pptx
PURPOSE OF DATABASE final.pptx
 
fundamental relation algebra.pptx
fundamental relation algebra.pptxfundamental relation algebra.pptx
fundamental relation algebra.pptx
 
DBMS ARCHITECTURE.pptx
DBMS ARCHITECTURE.pptxDBMS ARCHITECTURE.pptx
DBMS ARCHITECTURE.pptx
 
Database user and administrator.pptx
Database user and administrator.pptxDatabase user and administrator.pptx
Database user and administrator.pptx
 
CSS
CSSCSS
CSS
 
Greedy method
Greedy methodGreedy method
Greedy method
 
Heap sort
Heap sortHeap sort
Heap sort
 

Recently uploaded

The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 

Recently uploaded (20)

The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 

AGGREGATE FUNCTION.pptx

  • 2. PREPARED BY MS.G.ABIRAMI – III - B.SC - INFORMATION TECHNOLOGY UNDER THE GUIDANCE OF MRS.P.ANUSHA M.SC(IT).,M.PHIL.,D.P.T.T.,(PH.D)., ASSISTANT PROFESSOR, DEPARTMENT OF INFORMATION TECHNOLOGY, BON SECOURS COLLEGE FOR WOMEN, THANJAVUR.
  • 3. SQL AGGREGATE FUNCTION  SQL aggregation function is used to perform the calculation on multiple rows of a single column of a table. It returns a single value.  It is also used to summarize the data.  This function ignore the null values except the count function .
  • 4.
  • 5. TYPES OF SQL AGGREGATION FUNCTION Count ( ) : Returns the numbers of rows Sum ( ) : Returns the sum Avg ( ) : Returns the average value Max ( ) : Returns the smallest value Min ( ) : Returns the largest value
  • 6. COUNT FUNCTION Count function is used to count the number of rows in database table .It can work on both numeric and non-numeric data types. Count function uses the count (*) that returns the count of all the rows in a specific table. Count (*) considers duplicate and null . This function does not count the null value . Table name :Employee
  • 7. EXAMPLE :TABLE NAME DATE PAGES RAMU 22022-01-12 34 GEETHA 22022-01-12 74 SEETHA 22022-01-12 64 RAM 22022-01-12 94 SUKRIA 22022-01-12 64
  • 8. SYNTAX OF COUNT Syntax: select count(Pages) from employee; Count (pages) 5 1 row in set Syntax: select count (name) from employee; Count(name) 5 1 row in set
  • 9. SUM FUNCTION • Sum() function is an aggregate function that calculates the sum of all or distinct values in an expression . SYNTAX: SELECT SUM (PAGES) FROM EMPLOYEE; SUM(PAGES) 330 1 ROW IN A SET
  • 10. AVERAGE FUNCTION • The avg function is used to calculate the average value of the numeric type. Average function returns the average of all non-null values. syntax: select avg (pages)from employee; avg(pages) 66.0000 1row in set
  • 11. MAX FUNCTION • Max function is used to find the maximum value of certain column. This function determines the largest value of all selected values of columns. Syntax: select max (pages) from employee; Max(pages) 94 1 row in set
  • 12. MIN FUNCTION • The Min function is used to find the minimum value of certain column. This function determines the smallest value of all selected values of a column. syntax: Select min(pages)from employee ; Min(pages) 34 1 row in set