0% found this document useful (0 votes)
35 views

DBMS Microproject - pdf1-2

DBMS FINAL POROJCT

Uploaded by

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

DBMS Microproject - pdf1-2

DBMS FINAL POROJCT

Uploaded by

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

A project report on

“ Aggregate Functions in DBMS”

UNDER THE GUIDANCE OF


Prof. Kandekar G.K

Submitted By :
Ms.Jawale Rutika Yogesh (9)
Mr.Kadam Aniket Sharad (10)

Mr.Hon Nilesh Jayanand (11)

Ms.Rode Priyanka Ramesh (12)

DEPARTMENT OF COMPUTER ENGIEERING


GAUTAM POLYTECHNIC INSTITUTE GAUTAMNAGAR -
423602
Academic year -2024-25
MAHARSHTARA STATE BOARD OF TECHNICAL
EDUCATION , MUMBAI.

KARMVER SHANKARRAO KALE EDUCATION SOCIETY’S


GAUTAM POLYTECHNIC INSTITUE GAUTAMNAGAR-
423602
Academic Year-2024-25

CERTIFICATE
This is to certify that Mr. HON NILESH JAYANAND (11)
and others have/has successfully completed the project work on
Aggregate Functions in DBMS in partial fulfillment of diploma in
computer engineering during academic year 2024-25.

Miss. Kandekar G.K Mr. Bharti M.B Mr.Bharti S.M


Project Guide H.O.D Principal
GPI Institute
Acknowledgement
First and the foremost we, express my deep sense of gratitude,
sincere thanks And deep sense of appreciation to Project
Guide Miss. Kandekar
G.K Department of Computer Engineering, Gautam Polytechnic
Institute . Your availability at any time Throughout the year,
valuable guidance, opinion, view, comments, critics,
Encouragement, and support tremendously boosted this project
work. Lots of thanks To Mr Bharti M.B, Head Of Department ,
for providing us the best support we ever Had. We like to
express my sincere gratitude to Prof. Bharti S.M, Principal, for
Providing a great platform to complete the project within the
scheduled time. Last but not the least, we should say thanks
from Our bottom of heartto my Family and Friends for their
help, and support in so many Ways through all this time.
Index
Sr no Content Page no

1 Introduction

2 Concept

3 Example

4 Conclusion

5 References
Introduction
Aggregate functions in DBMS are used to perform calculations
on sets of data. They take a set of values as input and return a
single value as output. These functions are often used to
generate summary statistics on large datasets, such as the
average, minimum, maximum, and sum of a set of values. They
can also be used to count the number of rows in a dataset, and
perform other complex calculations. In a nutshell, Aggregate
Functions in DBMS are used for summarizing the data.
Types of Aggregate Functions in DBMS Count()
Sum()
Avg()
Min()
Max()
Concept
1. COUNT FUNCTION
COUNT function is used to Count the number of rows in a database
table. It can work on both numeric and non-numeric data types. COUNT
function uses the COUNT(*)that returns the count of all the rows in a
specified table. COUNT(*) considers duplicate and Null.
Syntax
COUNT(*)
Or
COUNT( [ALL|DISTINCT] expression )
Example: COUNT()
SELECT COUNT(*)
FROM PRODUCT_MAST;
Output:
10

2. SUM Function
Sum function is used to calculate the sum of all selected columns. It
works on numeric fields only.The SUM() function in DBMS accepts a
column name as an input and returns the total of all non-NULL
values in that
column. It only works on numeric fields (i.e the columns contain only
numeric values). If this function is applied to columns that include both
non-numeric (like, strings) and numeric values, it only considers the
numeric values. If there are no numeric values, the method returns 0.
Syntax
SUM()
Or
SUM( [ALL|DISTINCT] expression )

Example:
SUM()
SELECT SUM(COST) FROM
PRODUCT_MAST;
Output:
670

3. AVG function
The AVG function is used to calculate the average value of the numeric
type. The AVG() aggregate function in DBMS takes the column name as
an input and returns the average of all non-NULL values in that
column. It only works on
numeric fields (i.e the columns contain only numeric values).
Syntax
AVG()
Or
AVG( [ALL|DISTINCT] expression ) Example: SELECT
AVG(COST) FROM PRODUCT_MAST;
Output:
67.00.

4. MAX Function
MAX function is used to find the maximum value of a certain column.
This function determines the largest value of all selected values of a
column.

Syntax
MAX()
Or
MAX( [ALL|DISTINCT] expression ) Example:
SELECT MAX(RATE) FROM
PRODUCT_MAST;
output
30

5. MIN Function
MIN function is used to find the minimum value of a certain column.
This function determines the smallest value of all selected values of a
column.
Syntax
MIN()
Or
MIN( [ALL|DISTINCT] expression ) Example:
SELECT MIN(RATE)
FROM PRODUCT_MAST;
Output:
10
Conclusion
Aggregate functions in SQLs are an exceptionally useful feature
in data retrieval from the database. The fact that you can query
data and apply functions in the same query is remarkable.
A single-line query can be used to perform operations on
multiple records.SQL aggregate functions return a single value,
calculated from values in a column.
Aggregation based on self-joins is a challenge. You have to
build a table with one column that has the unique keys of the
subtree and use it to find the rows to be used in the aggregate
calculations. One way to “flatten” the table is to use an auxiliary
table, called Sequence, which contains the single column
sequence of integers from 1 to (n), where (n) is a sufficiently
large number
References

https://www.relationaldbdesign.com/advanc
ed-sql/module4/sql-function-conclusion.php
https://www.prepbytes.com/blog/dbms/aggr
egate-functions-in-dbms/
https://www.simplilearn.com/tutorials/sqltut
orial/sql-aggregate-functions

You might also like