0% found this document useful (0 votes)
35 views4 pages

Tutorial - Aggregate Functions (AVG, COUNT, MAX, SUM) : Lecturer: Clive Gargan Database Design & Development

This document discusses aggregate functions in database queries, including AVG to return the average value, COUNT to count the number of records, MAX to return the maximum value, and SUM to sum the values. Examples are provided for each aggregate function using the age field from a members table to demonstrate how to write and execute queries using AVG, COUNT, MAX, and SUM.

Uploaded by

Rahul Poswal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views4 pages

Tutorial - Aggregate Functions (AVG, COUNT, MAX, SUM) : Lecturer: Clive Gargan Database Design & Development

This document discusses aggregate functions in database queries, including AVG to return the average value, COUNT to count the number of records, MAX to return the maximum value, and SUM to sum the values. Examples are provided for each aggregate function using the age field from a members table to demonstrate how to write and execute queries using AVG, COUNT, MAX, and SUM.

Uploaded by

Rahul Poswal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Lecturer : Clive Gargan Database Design & Development

Tutorial – Aggregate Functions (AVG, COUNT, MAX, SUM )


Aggregrate Functions perform a calculation on a set of values and return for a single value.

AVG
To return the Average Age of the Members in our table write the following select statement and
execute.
Lecturer : Clive Gargan Database Design & Development

COUNT
To return the number of records we have in our member table write the following select statement
and execute.
Lecturer : Clive Gargan Database Design & Development

MAX
To return the maximum age from the Members table write the following select statement and
execute.
Lecturer : Clive Gargan Database Design & Development

SUM
To get the sum of all ages write the following select statement and execute.

You might also like