Press enter to see results or esc to cancel.

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



Comments

Comments are disabled for this post