Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Summary

Summary SQL part 3

Rating
-
Sold
-
Pages
7
Uploaded on
11-10-2025
Written in
2025/2026

In this, we learn about Equijoin, Natural Join, and Cartesian Product

Institution
Course

Content preview

UNIT III – DATABASE MANAGEMENT
STRUCTURED QUERY LANGUAGE(SQL)
SQL : PART 3

GROUP FUNCTIONS/AGGREGATE FUNCTIONS
Group functions are also called aggregate functions.They work upon group of rows and return one result for
the complete set of rows
Table : EMPL




1. SUM( ) : To find the sum of the values under the specified column. If distinct keyword is
specified then duplicate values are ignored.
Syntax : SELECT SUM(column name)
FROM <table name> WHERE <search condition>;




SELECT SUM(sal) FROM EMPL WHERE job = ‘SALESMAN’;

2. AVG( ) : To find the average value in a column
Syntax : SELECT AVG(column name)
FROM <table name> WHERE <search condition>;




1)Write a query to display the average salary of employees in
department number 20
SELECT AVG(sal) FROM EMPL WHERE deptno =20;
2)Write a query to display the average salary of all salesman.
SELECT AVG(SAL) FROM EMPL WHERE job =”SALESMAN”;

3. MIN( ) :To find the smallest value in a column
Syntax : SELECT MIN(column name)
FROM <table name> WHERE <search condition>;

, Eg:
Write a query to display the minimum salary of employees
SELECT MIN(SAL) FROM EMPL

4. MAX( ) : To find the largest value in a column
Syntax : SELECT MAX(column name)
FROM <table name> WHERE <search condition>;




SELECT MAX(SAL) FROM EMPL WHERE job = ‘SALESMAN’;

5. COUNT – This function is used to counts the number of values in a column.
i)COUNT(column name): To count the number of non NULL values in a column ( excludes
NULL values)
ii)COUNT(*): To count the total number of rows in a table including NULL values.

Written for

Institution
Secondary school
School year
1

Document information

Uploaded on
October 11, 2025
Number of pages
7
Written in
2025/2026
Type
SUMMARY

Subjects

$15.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
arshidaarsheya

Also available in package deal

Get to know the seller

Seller avatar
arshidaarsheya
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
8 months
Number of followers
0
Documents
9
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions