SlideShare a Scribd company logo
10SQL SERVER: DOINGCALCULATIONS WITH FUNCTIONS
Mathematical FunctionsCan mathematical functions be used on my tables?	Yes. Microsoft SQL Server 2008 provides several mathematical functions such as sum(col), avg(col), min(col), max(col), count(col) etc. In SQL, they are referred to as aggregate functions as they work upon aggregates of rows.Functions Explained:Sum(fieldName): Find the sum of field values of all recordsAvg(fieldName): Find the average of field values of all recordsMin(fieldName): Find the minimum of the field values of all recordsMax(fieldName): Find the maximum of the field values of all recordsCount(fieldName): Find the number of field values in the table records
Mathematical FunctionsConsider an Interpol database which contains a table of the biggest robberies that took place this year, all around the world.Now, lets look into the application of math functions over this table.
Mathematical Functions1. Find the TOTAL booty of all the robberies:Select sum(booty) from robberies;2. Find the Average booty of all the robberies:Select avg(booty) from robberies;3. Find the robbery with the maximal bootySelect max(booty) from robberies;4. Find the robbery with the minimal bootySelect min(booty) from robberies;5. Find the number of robbery cases:Select count(booty) from robberies;
Using as conditionHEY??? I CANNOT USE THESE FUNCTIONS WITH MY ‘WHERE’ CONDITION???Microsoft SQL Server 2008 restricts the user to use these functions with ‘WHERE’ conditions. Therefore, to solve our problem three keywords: ‘having’, ‘any’ and ‘in’select * from tablename having <condition>;select * from tablename where colname=any(cond);select * from tablename where colname in (condition);
Advanced AggregatesIS THERE ANY OTHER MODIFICATION TO THESE FUNCTIONS?	We can combine these functions with ‘group by’ function for better results.select sum(col1),col2 from tablename group by col2;The above command will find out the sum of each group from column 2 More than one aggregate functions can be used simultaneously, seperated by commas.Eg: select sum(col1), count(col1) from tablename;Consider the example in the next slide.
Advanced AggregatesConsider an employee table:Find the Number of Employees working in each department:Select count(empid), depid from employee;Result:
Additional Functions upper (fieldName)Converts the value of fieldName to upper case. Can be used with strings. lower (fieldName)Converts the value of fieldName to lowercase. Can be used with strings.
Summary10. Doing Calculations with functions  Sum
Avg

More Related Content

What's hot (19)

Lesson9
Lesson9
Alex Honcharuk
 
random forest regression
random forest regression
Akhilesh Joshi
 
Mapreduce: Theory and implementation
Mapreduce: Theory and implementation
Sri Prasanna
 
Excel/R
Excel/R
Andrija Djurovic
 
multiple linear regression
multiple linear regression
Akhilesh Joshi
 
simple linear regression
simple linear regression
Akhilesh Joshi
 
decision tree regression
decision tree regression
Akhilesh Joshi
 
PART 6: FROM GEO INTO YOUR REPORT
PART 6: FROM GEO INTO YOUR REPORT
Andrea Antonello
 
Sql FUNCTIONS
Sql FUNCTIONS
Abrar ali
 
c++ programming Unit 4 operators
c++ programming Unit 4 operators
AAKASH KUMAR
 
Stack linked list
Stack linked list
bhargav0077
 
R-Excel Integration
R-Excel Integration
Andrija Djurovic
 
Presentation topic is stick data structure
Presentation topic is stick data structure
AizazAli21
 
polynomial linear regression
polynomial linear regression
Akhilesh Joshi
 
knn classification
knn classification
Akhilesh Joshi
 
PART 3: THE SCRIPTING COMPOSER AND PYTHON
PART 3: THE SCRIPTING COMPOSER AND PYTHON
Andrea Antonello
 
PART 4: GEOGRAPHIC SCRIPTING
PART 4: GEOGRAPHIC SCRIPTING
Andrea Antonello
 
Java Week6(B) Notepad
Java Week6(B) Notepad
Chaitanya Rajkumar Limmala
 
V22 function-1
V22 function-1
Dhirendra Chauhan
 
random forest regression
random forest regression
Akhilesh Joshi
 
Mapreduce: Theory and implementation
Mapreduce: Theory and implementation
Sri Prasanna
 
multiple linear regression
multiple linear regression
Akhilesh Joshi
 
simple linear regression
simple linear regression
Akhilesh Joshi
 
decision tree regression
decision tree regression
Akhilesh Joshi
 
PART 6: FROM GEO INTO YOUR REPORT
PART 6: FROM GEO INTO YOUR REPORT
Andrea Antonello
 
Sql FUNCTIONS
Sql FUNCTIONS
Abrar ali
 
c++ programming Unit 4 operators
c++ programming Unit 4 operators
AAKASH KUMAR
 
Stack linked list
Stack linked list
bhargav0077
 
Presentation topic is stick data structure
Presentation topic is stick data structure
AizazAli21
 
polynomial linear regression
polynomial linear regression
Akhilesh Joshi
 
PART 3: THE SCRIPTING COMPOSER AND PYTHON
PART 3: THE SCRIPTING COMPOSER AND PYTHON
Andrea Antonello
 
PART 4: GEOGRAPHIC SCRIPTING
PART 4: GEOGRAPHIC SCRIPTING
Andrea Antonello
 

Viewers also liked (15)

MS SQL SERVER: Introduction To Database Concepts
MS SQL SERVER: Introduction To Database Concepts
sqlserver content
 
MS SQLSERVER:Manipulating Database
MS SQLSERVER:Manipulating Database
sqlserver content
 
MS Sql Server: Reporting basics
MS Sql Server: Reporting basics
sqlserver content
 
MS Sql Server: Datamining Introduction
MS Sql Server: Datamining Introduction
sqlserver content
 
MS SQL SERVER: Microsoft sequence clustering and association rules
MS SQL SERVER: Microsoft sequence clustering and association rules
sqlserver content
 
MS SQL SERVER: Using the data mining tools
MS SQL SERVER: Using the data mining tools
sqlserver content
 
MS SQL SERVER: Creating A Database
MS SQL SERVER: Creating A Database
sqlserver content
 
MS SQL SERVER: Neural network and logistic regression
MS SQL SERVER: Neural network and logistic regression
sqlserver content
 
MS Sql Server: Business Intelligence
MS Sql Server: Business Intelligence
sqlserver content
 
MS Sql Server: Reporting introduction
MS Sql Server: Reporting introduction
sqlserver content
 
MS SQLSERVER:Feeding Data Into Database
MS SQLSERVER:Feeding Data Into Database
sqlserver content
 
MS SQLSERVER:Retrieving Data From A Database
MS SQLSERVER:Retrieving Data From A Database
sqlserver content
 
MS SQL SERVER: SSIS and data mining
MS SQL SERVER: SSIS and data mining
sqlserver content
 
MS SQLSERVER:Joining Databases
MS SQLSERVER:Joining Databases
sqlserver content
 
MS SQL SERVER: Getting Started With Sql Server 2008
MS SQL SERVER: Getting Started With Sql Server 2008
sqlserver content
 
MS SQL SERVER: Introduction To Database Concepts
MS SQL SERVER: Introduction To Database Concepts
sqlserver content
 
MS SQLSERVER:Manipulating Database
MS SQLSERVER:Manipulating Database
sqlserver content
 
MS Sql Server: Reporting basics
MS Sql Server: Reporting basics
sqlserver content
 
MS Sql Server: Datamining Introduction
MS Sql Server: Datamining Introduction
sqlserver content
 
MS SQL SERVER: Microsoft sequence clustering and association rules
MS SQL SERVER: Microsoft sequence clustering and association rules
sqlserver content
 
MS SQL SERVER: Using the data mining tools
MS SQL SERVER: Using the data mining tools
sqlserver content
 
MS SQL SERVER: Creating A Database
MS SQL SERVER: Creating A Database
sqlserver content
 
MS SQL SERVER: Neural network and logistic regression
MS SQL SERVER: Neural network and logistic regression
sqlserver content
 
MS Sql Server: Business Intelligence
MS Sql Server: Business Intelligence
sqlserver content
 
MS Sql Server: Reporting introduction
MS Sql Server: Reporting introduction
sqlserver content
 
MS SQLSERVER:Feeding Data Into Database
MS SQLSERVER:Feeding Data Into Database
sqlserver content
 
MS SQLSERVER:Retrieving Data From A Database
MS SQLSERVER:Retrieving Data From A Database
sqlserver content
 
MS SQL SERVER: SSIS and data mining
MS SQL SERVER: SSIS and data mining
sqlserver content
 
MS SQLSERVER:Joining Databases
MS SQLSERVER:Joining Databases
sqlserver content
 
MS SQL SERVER: Getting Started With Sql Server 2008
MS SQL SERVER: Getting Started With Sql Server 2008
sqlserver content
 
Ad

Similar to MS SQLSERVER:Doing Calculations With Functions (20)

2. mathematical functions in excel
2. mathematical functions in excel
Dr. Prashant Vats
 
Introduction to Oracle Functions--(SQL)--Abhishek Sharma
Introduction to Oracle Functions--(SQL)--Abhishek Sharma
अभिषेक शर्मा
 
database_set_operations_&_function.pptx
database_set_operations_&_function.pptx
tanvirkhanfahim
 
Empowerment-Technology-Microsoft-Excel.pptx
Empowerment-Technology-Microsoft-Excel.pptx
JohnMeja11
 
Introduction to oracle functions
Introduction to oracle functions
Nitesh Singh
 
Chapter9 more on database and sql
Chapter9 more on database and sql
KV(AFS) Utarlai, Barmer (Rajasthan)
 
MS SQL Server.ppt sql
MS SQL Server.ppt sql
NaheedBaloxh
 
Intro to tsql unit 10
Intro to tsql unit 10
Syed Asrarali
 
Data Transformation
Data Transformation
ArmanArafatAnik
 
Structured query language(sql)
Structured query language(sql)
Huda Alameen
 
My SQL.pptx
My SQL.pptx
KieveBarreto1
 
C++
C++
MuhammadSaad281
 
Mysql1
Mysql1
rajikaa
 
The Ring programming language version 1.8 book - Part 94 of 202
The Ring programming language version 1.8 book - Part 94 of 202
Mahmoud Samir Fayed
 
Sql Queries
Sql Queries
webicon
 
Lecture on the BASIC MICROSOFT EXCEL lectur
Lecture on the BASIC MICROSOFT EXCEL lectur
Bono42
 
Sql wksht-3
Sql wksht-3
Mukesh Tekwani
 
ADVANCE ITT BY PRASAD
ADVANCE ITT BY PRASAD
PADYALAMAITHILINATHA
 
The Ring programming language version 1.5.2 book - Part 175 of 181
The Ring programming language version 1.5.2 book - Part 175 of 181
Mahmoud Samir Fayed
 
MySQL-commands.pdf
MySQL-commands.pdf
ssuserc5aa74
 
2. mathematical functions in excel
2. mathematical functions in excel
Dr. Prashant Vats
 
database_set_operations_&_function.pptx
database_set_operations_&_function.pptx
tanvirkhanfahim
 
Empowerment-Technology-Microsoft-Excel.pptx
Empowerment-Technology-Microsoft-Excel.pptx
JohnMeja11
 
Introduction to oracle functions
Introduction to oracle functions
Nitesh Singh
 
MS SQL Server.ppt sql
MS SQL Server.ppt sql
NaheedBaloxh
 
Intro to tsql unit 10
Intro to tsql unit 10
Syed Asrarali
 
Structured query language(sql)
Structured query language(sql)
Huda Alameen
 
The Ring programming language version 1.8 book - Part 94 of 202
The Ring programming language version 1.8 book - Part 94 of 202
Mahmoud Samir Fayed
 
Sql Queries
Sql Queries
webicon
 
Lecture on the BASIC MICROSOFT EXCEL lectur
Lecture on the BASIC MICROSOFT EXCEL lectur
Bono42
 
The Ring programming language version 1.5.2 book - Part 175 of 181
The Ring programming language version 1.5.2 book - Part 175 of 181
Mahmoud Samir Fayed
 
MySQL-commands.pdf
MySQL-commands.pdf
ssuserc5aa74
 
Ad

More from sqlserver content (18)

MS SQL SERVER: Programming sql server data mining
MS SQL SERVER: Programming sql server data mining
sqlserver content
 
MS SQL SERVER: Olap cubes and data mining
MS SQL SERVER: Olap cubes and data mining
sqlserver content
 
MS SQL SERVER: Microsoft time series algorithm
MS SQL SERVER: Microsoft time series algorithm
sqlserver content
 
MS SQL SERVER: Microsoft naive bayes algorithm
MS SQL SERVER: Microsoft naive bayes algorithm
sqlserver content
 
MS SQL SERVER: Decision trees algorithm
MS SQL SERVER: Decision trees algorithm
sqlserver content
 
MS SQL Server: Data mining concepts and dmx
MS SQL Server: Data mining concepts and dmx
sqlserver content
 
MS Sql Server: Reporting models
MS Sql Server: Reporting models
sqlserver content
 
MS Sql Server: Reporting manipulating data
MS Sql Server: Reporting manipulating data
sqlserver content
 
MS SQLSERVER:Deleting A Database
MS SQLSERVER:Deleting A Database
sqlserver content
 
MS SQLSERVER:Customizing Your D Base Design
MS SQLSERVER:Customizing Your D Base Design
sqlserver content
 
MS SQLSERVER:Creating Views
MS SQLSERVER:Creating Views
sqlserver content
 
MS SQLSERVER:Creating A Database
MS SQLSERVER:Creating A Database
sqlserver content
 
MS SQLSERVER:Advanced Query Concepts Copy
MS SQLSERVER:Advanced Query Concepts Copy
sqlserver content
 
MS SQLSERVER:Sql Functions And Procedures
MS SQLSERVER:Sql Functions And Procedures
sqlserver content
 
MS SQL SERVER: Sql Functions And Procedures
MS SQL SERVER: Sql Functions And Procedures
sqlserver content
 
MS SQL SERVER: Retrieving Data From A Database
MS SQL SERVER: Retrieving Data From A Database
sqlserver content
 
MS SQL SERVER: Manipulating Database
MS SQL SERVER: Manipulating Database
sqlserver content
 
MS SQL SERVER: Joining Databases
MS SQL SERVER: Joining Databases
sqlserver content
 
MS SQL SERVER: Programming sql server data mining
MS SQL SERVER: Programming sql server data mining
sqlserver content
 
MS SQL SERVER: Olap cubes and data mining
MS SQL SERVER: Olap cubes and data mining
sqlserver content
 
MS SQL SERVER: Microsoft time series algorithm
MS SQL SERVER: Microsoft time series algorithm
sqlserver content
 
MS SQL SERVER: Microsoft naive bayes algorithm
MS SQL SERVER: Microsoft naive bayes algorithm
sqlserver content
 
MS SQL SERVER: Decision trees algorithm
MS SQL SERVER: Decision trees algorithm
sqlserver content
 
MS SQL Server: Data mining concepts and dmx
MS SQL Server: Data mining concepts and dmx
sqlserver content
 
MS Sql Server: Reporting models
MS Sql Server: Reporting models
sqlserver content
 
MS Sql Server: Reporting manipulating data
MS Sql Server: Reporting manipulating data
sqlserver content
 
MS SQLSERVER:Deleting A Database
MS SQLSERVER:Deleting A Database
sqlserver content
 
MS SQLSERVER:Customizing Your D Base Design
MS SQLSERVER:Customizing Your D Base Design
sqlserver content
 
MS SQLSERVER:Creating A Database
MS SQLSERVER:Creating A Database
sqlserver content
 
MS SQLSERVER:Advanced Query Concepts Copy
MS SQLSERVER:Advanced Query Concepts Copy
sqlserver content
 
MS SQLSERVER:Sql Functions And Procedures
MS SQLSERVER:Sql Functions And Procedures
sqlserver content
 
MS SQL SERVER: Sql Functions And Procedures
MS SQL SERVER: Sql Functions And Procedures
sqlserver content
 
MS SQL SERVER: Retrieving Data From A Database
MS SQL SERVER: Retrieving Data From A Database
sqlserver content
 
MS SQL SERVER: Manipulating Database
MS SQL SERVER: Manipulating Database
sqlserver content
 
MS SQL SERVER: Joining Databases
MS SQL SERVER: Joining Databases
sqlserver content
 

Recently uploaded (20)

War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 
Introduction to Typescript - GDG On Campus EUE
Introduction to Typescript - GDG On Campus EUE
Google Developer Group On Campus European Universities in Egypt
 
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
 
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Shashikant Jagtap
 
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Safe Software
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Safe Software
 
Bridging the divide: A conversation on tariffs today in the book industry - T...
Bridging the divide: A conversation on tariffs today in the book industry - T...
BookNet Canada
 
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
Edge AI and Vision Alliance
 
Data Validation and System Interoperability
Data Validation and System Interoperability
Safe Software
 
Analysis of the changes in the attitude of the news comments caused by knowin...
Analysis of the changes in the attitude of the news comments caused by knowin...
Matsushita Laboratory
 
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
Muhammad Rizwan Akram
 
High Availability On-Premises FME Flow.pdf
High Availability On-Premises FME Flow.pdf
Safe Software
 
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
AmirStern2
 
The State of Web3 Industry- Industry Report
The State of Web3 Industry- Industry Report
Liveplex
 
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
 
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
Edge AI and Vision Alliance
 
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
AmirStern2
 
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Alliance
 
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
 
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Shashikant Jagtap
 
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Safe Software
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Safe Software
 
Bridging the divide: A conversation on tariffs today in the book industry - T...
Bridging the divide: A conversation on tariffs today in the book industry - T...
BookNet Canada
 
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
Edge AI and Vision Alliance
 
Data Validation and System Interoperability
Data Validation and System Interoperability
Safe Software
 
Analysis of the changes in the attitude of the news comments caused by knowin...
Analysis of the changes in the attitude of the news comments caused by knowin...
Matsushita Laboratory
 
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
Muhammad Rizwan Akram
 
High Availability On-Premises FME Flow.pdf
High Availability On-Premises FME Flow.pdf
Safe Software
 
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
AmirStern2
 
The State of Web3 Industry- Industry Report
The State of Web3 Industry- Industry Report
Liveplex
 
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
 
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
Edge AI and Vision Alliance
 
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
AmirStern2
 
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Alliance
 

MS SQLSERVER:Doing Calculations With Functions

  • 2. Mathematical FunctionsCan mathematical functions be used on my tables? Yes. Microsoft SQL Server 2008 provides several mathematical functions such as sum(col), avg(col), min(col), max(col), count(col) etc. In SQL, they are referred to as aggregate functions as they work upon aggregates of rows.Functions Explained:Sum(fieldName): Find the sum of field values of all recordsAvg(fieldName): Find the average of field values of all recordsMin(fieldName): Find the minimum of the field values of all recordsMax(fieldName): Find the maximum of the field values of all recordsCount(fieldName): Find the number of field values in the table records
  • 3. Mathematical FunctionsConsider an Interpol database which contains a table of the biggest robberies that took place this year, all around the world.Now, lets look into the application of math functions over this table.
  • 4. Mathematical Functions1. Find the TOTAL booty of all the robberies:Select sum(booty) from robberies;2. Find the Average booty of all the robberies:Select avg(booty) from robberies;3. Find the robbery with the maximal bootySelect max(booty) from robberies;4. Find the robbery with the minimal bootySelect min(booty) from robberies;5. Find the number of robbery cases:Select count(booty) from robberies;
  • 5. Using as conditionHEY??? I CANNOT USE THESE FUNCTIONS WITH MY ‘WHERE’ CONDITION???Microsoft SQL Server 2008 restricts the user to use these functions with ‘WHERE’ conditions. Therefore, to solve our problem three keywords: ‘having’, ‘any’ and ‘in’select * from tablename having <condition>;select * from tablename where colname=any(cond);select * from tablename where colname in (condition);
  • 6. Advanced AggregatesIS THERE ANY OTHER MODIFICATION TO THESE FUNCTIONS? We can combine these functions with ‘group by’ function for better results.select sum(col1),col2 from tablename group by col2;The above command will find out the sum of each group from column 2 More than one aggregate functions can be used simultaneously, seperated by commas.Eg: select sum(col1), count(col1) from tablename;Consider the example in the next slide.
  • 7. Advanced AggregatesConsider an employee table:Find the Number of Employees working in each department:Select count(empid), depid from employee;Result:
  • 8. Additional Functions upper (fieldName)Converts the value of fieldName to upper case. Can be used with strings. lower (fieldName)Converts the value of fieldName to lowercase. Can be used with strings.
  • 9. Summary10. Doing Calculations with functions Sum
  • 10. Avg
  • 15. Advanced groupingVisit more self help tutorialsPick a tutorial of your choice and browse through it at your own pace.The tutorials section is free, self-guiding and will not involve any additional support.Visit us at www.dataminingtools.net