BUILT IN FUNCTIONS IN SQL, Lab Reports of Database Management Systems (DBMS)

THESE ARE SOME BASIC DATABASE LABS ASSIGNMENT EASY FOR BEGINNERS..THEY CONTAIN OUPUT PICS AND CODE AS WELL

Typology: Lab Reports

2021/2022

Available from 08/19/2022

SamenKhan
SamenKhan 🇵🇰

231 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
NUST
Military College of Signals,
Rawalpindi.
DATABASE SYSTEM
LAB # 6
BATCH-26C
Submitted By:
AYMEN FATIMA
CMS ID:
345556
Submitted To:
Sir Kabeer Ahmed
DEPARTMENT OF COMPUTER SOFTWARE ENGINEERING.
MILITARY COLLEGE OF SIGNALS.
pf3
pf4

Partial preview of the text

Download BUILT IN FUNCTIONS IN SQL and more Lab Reports Database Management Systems (DBMS) in PDF only on Docsity!

NUST

Military College of Signals,

Rawalpindi.

DATABASE SYSTEM

LAB # 6

BATCH-26C

Submitted By:

AYMEN FATIMA

CMS ID:

Submitted To:

Sir Kabeer Ahmed

DEPARTMENT OF COMPUTER SOFTWARE ENGINEERING.

MILITARY COLLEGE OF SIGNALS.

EXPERIMENT 6 – SQL INBUILT FUNCTIONS

Problem 6.1 :

Count and diplay the total numer of employees in Administration Department.

Select count(EmpName) from Employee where

department='Administration'

Problem 6.2 :

Calaulate the max and min rate of resources and name the column as max_rate and

min_rate.

Select Max(rate) as max_rate, Min(rate) as min_rate from ResourceTbl

Problem 6.3 :

List all resources and 30% rise in rate.

update resourcetbl set rate= (rate)+(rate* 0.3) Select * from resourcetbl

Problem 6.4 :

Show how many days are left for each event to be held as compare with current system date.

Select DATEDIFF(DD,dateheld,GETDATE()) from EventRequest

Problem 6.5 :

Show all customer city in captical letters.

Select Upper(city) from customer

Problem 6.6 :

Write a query to update name of all employees with capital letters. Verify you result

with select statement.

Update customer set city=UPPER(city) select city from customer

Employee

empno empname department email phone E100 Chuck Coordinator Administration [email protected] 3- E101 Mary Manager Football [email protected] 5- E102 Sally Supervisor Planning [email protected] 3- E103 Alan Administrator Administration [email protected] 3-

ResourceTbl

resno resname rate R100 attendant $10. R101 police $15. R102 usher $10. R103 nurse $20. R104 janitor $15. R105 food service $10.

EventRequest

eventno dateheld datereq facno custno dateauth status estcost estaudience budno E100 25-Oct-2018 06-Jun-2018 F100 C100 08-Jun-2018 Approved $5,000.00 80000 B E101 26-Oct-2018 28-Jul-2018 F100 C100 Pending $5,000.00 80000 B E102 14-Sep-2018 28-Jul-2018 F100 C100 31-Jul-2018 Approved $5,000.00 80000 B E103 21-Sep-2018 28-Jul-2018 F100 C100 01-Aug-2018 Approved $5,000.00 80000 B E104 03-Dec-2018 28-Jul-2018 F101 C101 31-Jul-2018 Approved $2,000.00 12000 B E105 05-Dec-2018 28-Jul-2018 F101 C101 01-Aug-2018 Approved $2,000.00 10000 B E106 12-Dec-2018 28-Jul-2018 F101 C101 31-Jul-2018 Approved $2,000.00 10000 B E107 23-Nov-2018 28-Jul-2018 F100 C105 31-Jul-2018 Denied $10,000.00 5000