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

DBMS LAB 04 - 21-CP-055

This lab report focuses on SQL functions, specifically aggregate and scalar functions, with the objective of understanding their application. It outlines various tasks involving data manipulation and analysis, including counting records, finding distinct values, converting text cases, and calculating maximum lengths. The report includes a sample table of student records and specifies tasks to be performed on this data.

Uploaded by

shapparhay
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)
2 views

DBMS LAB 04 - 21-CP-055

This lab report focuses on SQL functions, specifically aggregate and scalar functions, with the objective of understanding their application. It outlines various tasks involving data manipulation and analysis, including counting records, finding distinct values, converting text cases, and calculating maximum lengths. The report includes a sample table of student records and specifies tasks to be performed on this data.

Uploaded by

shapparhay
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/ 6

UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA

FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING

University of COMPUTER ENGINEERING DEPARTMENT

ENGINEERING & TECHNOLOGY


TAXILA
A PROGRAMMER'S PERSPECTIVE

DATBASE
MANAGEMENT SYSTEM

LAB REPORT #04


MINAL FATIMA
21-CP-55
UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING

COMPUTER ENGINEERING DEPARTMENT

SQL Functions
(Aggregate & Scalar functions)
Lab Objective:
The aim of this lab is to understand the different functions used in the SQL.

TASKS

Name Reg_No Courses Course_Code Offered_By

Ali 01 DIP 1001 Mr. A

Basit 02 DBMS 1002 Mr. X

Akram 03 OS 1003 Mr. Y

Asad 04 DBMS 1002 Mr. X

Zeeshan 05 DIP 1001 Mr. A

Muneer 06 OS Mr. Y

Shafqat 07 NM 1004 Mr. H

Ahsan 08 OS 1003 Mr. Y

Ikram 09 DIP Mr. A

Hassan 10 DSP

For the above table perform the following tasks:-

TASK 1:
⮚ Calculate the number of records for the 3rd, 4th and 5th column.
⮚ Find distinct number of records for the Course Code=1002 as Total.
⮚ Find number of students registered for the course DIP as Total Courses.
UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING

COMPUTER ENGINEERING DEPARTMENT


UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING

COMPUTER ENGINEERING DEPARTMENT

TASK 2:
Convert the text valued fields in the above table to the lower case and upper case alphabets.
UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING

COMPUTER ENGINEERING DEPARTMENT

TASK 3:
Select maximum of the Reg No.

TASK 4:
Find the length of each record for the first column in the above table as MAXIMUM LENGTH.
UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING

COMPUTER ENGINEERING DEPARTMENT

TASK 5:

Count how many products exists in above table.


Calculate average price of the products.

You might also like