Sharp Tutorial
Aggregate functions in sql

Python

Java

C

C++

HTML/CSS

Java Script

PHP

SQL

C Programs

SQL

  • SQL home
  • SQL introduction
  • SQL install and Run
  • create table
  • drop table
  • alter table
  • Insert into table
  • select query
  • Where Clause
  • Order By /Group By
  • Delete Query
  • Update query
  • Aggregate Function
  • Join Tables
  • SQL Examples
  • SQL Exercise

DBMS

Aggregate Functions in sql

An aggregate function is a function where the values of multiple rows are grouped together to give the single output value eg  count , max, min , sum etc.

Syntax: 

select aggregate function(column name) 

from table name

 where clause (optional).

SQL Query to count the number of students.

 
    select count(rollNo) from student ;
 

SQL Query to find the max fee and minimum fee from student table.

 
    select max(fee) from student ;
 

Above query may also be used with min function to find the minimum value. Where clause may also be combined to apply function only on selected records .

 
    select sum(fee) from student ;
 
 
    select avg(fee) from student ;
 

Enquiry about Course

Ask your Question

Click Here

Sharp (2) Tutorials

Video/ C Introduction

Watch video in full size

Video tutorial

Follow by Email
Facebook
Facebook
fb-share-icon
YouTube
Copyright © Sharp Tutorial
Build with WordPress
Wordpress Social Share Plugin powered by Ultimatelysocial
Sharp Tutorial