SQL Server Aggregate Functions

Aggregate Functions  in SQL server includes

Count

Max

Min

Sum

Avg

Suppose a table named Table1

id     name     mark

1      name1   100

2     name2    150

3     name3    200

 

Count returns Count of records

eg. select count(*) from Table1

=3

Max Returnds maximum of a column

eg. select Max(mark) from Table1

=200

Min Returns Minimum of a column

=100

Sum returns Sum of values in a column

eg. select Sum(mark) from Table1

=450

Avg Retuns Average of column values

eg. select Avg(mark) from Table1

=166

abhilash

abhilash, is a programmer by profession and a technology addict with a passion towards browsing , shopping and imaging . My views may be biased on reviews. all images and videos are copyrighted to respective owners.

Add comment

Your Header Sidebar area is currently empty. Hurry up and add some widgets.