Introduction of Aggregate function in SQL

In this article I am going to explain how to work with aggregate function in sql.
  • 2960

Introduction

There are two type of function in SQL which are used to manipulate data.

  • System Define Function
  • User Define Function

User define function are created by user according to need to performer some specific task but system define function are predefined we can not change their functionality. SQL Server provide lots of inbuilt function to manipulate data.

Here I am explaining name of aggregate function

  • AVG (expression) 
  • SUM (expression)
  • MIN (expression)
  • MAX (expression)
  • COUNT (expression)

Aggregate function are part of these inbuilt function which are used to performer a calculation on the values in a set of selected rows. A SELECT statement which uses these aggregate function known as summary query.

Statement that create mcninvoice table

inv.jpg

Statements that insert data in mcninvoice table

inv (2).jpg

Statement that is used to fetch data from mcninvoice table

inv111.jpg

Statement that use aggregate function

Clipboard02.jpg


Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.