Problem Statement - Practical 5
Problem Statement - Practical 5
Problem definition
Deposit
BORROW;
CUSTOMERS;
CNAME CITY
----------------------------------------------------- --------------------------------------------
ANIL CALCUTTA
SUNIL DELHI
MEHUL BARODA
MANDAR PATNA
MADHURI NAGPUR
PRAMOD NAGPUR
SANDIP SURAT
SHIVANI BOMBAY
KRANTI BOMBAY
NAREN BOMBAY
BRANCH;
BNAME CITY
------------------------------------------------------- ---------------------------------------
VRCH NAGPUR
AJNI NAGPUR
KAROLBAGH DELHI
CHANDI DELHI
DHARAMPETH NAGPUR
M.G.ROAD BANGLORE
ANDHERI BOMBAY
VIRAR BOMBAY
NEHRU PLACE DELHI
POWAI BOMBAY
Employee
EMP_NO EMP_NAME EMP_SAL EMP_COMM DEPT_NO
---------- ---------------------------------------- ------------------ --------------------- ----------
101 Smith 800 10
102 Snehal 1600 300 25
103 Lakshman 1100 0 20
104 Aman 3000 10
105 Anita 5000 50000 10
106 Sneha 2450 24500 10
107 Anamika 1975 30
Problem statements
(1) List total deposit from deposit.
(2) List total loan from karolbagh branch
(6) Create table supplier from employee with all the columns.
(7) Create table sup1 from employee with first two columns.
(9) Insert the data into sup2 from employee whose second character should be ‘n’
and string should be 5 characters long in employee name field.
(14) Update the value dept_no to 10 where second character of emp. name is ‘m’.
(15) Update the value of employee name whose employee number is 103.
(16) Write a query to display the current date. Label the column Date
(17) For each employee, display the employee number, job, salary, and salary
increased by 15% and expressed as a whole number. Label the column New Salary
(18) Modify your query no 4.(2) to add a column that subtracts the old salary from
the new salary. Label the column Increase
(19) Write a query that displays the employee’s names with the first letter capitalized
and all other letters lowercase, and the length of the names, for all employees whose
name starts with J, A, or M. Give each column an appropriate label. Sort the results
by the employees’ last names.
(20) Write a query that produces the following for each employee:
<employee last name> earns <salary> monthly