DBMS 2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

DATABASE MANAGEMENT SYSTEM LAB

Name: Pranshu Tripathi


Enrollment No. A50105223005
Experiment No.: 2
AIM: Aggregate Functions

1. MIN

The MIN() function returns the smallest value of the selected column.

Syntax:

SELECT MIN(column_name)
FROM table_name
WHERE condition;
Output:

2. MAX
The MAX() function returns the largest value of the selected column.
Syntax:

SELECT MAX(column_name)
FROM table_name
WHERE condition;
Output:
3. COUNT

The COUNT() function returns the number of rows that matches a specified criterion.
Syntax:
SELECT COUNT(column_name)
FROM table_name
WHERE condition;
Output:

4. AVG

The AVG() function returns the average value of a numeric column.

Syntax:

SELECT AVG(column_name)
FROM table_name
WHERE condition;

Output:
5. SUM

The SUM() function returns the total sum of a numeric column.

Syntax:

SELECT column1, column2, ...


FROM table_name
WHERE condition;

Output:

You might also like