DBMS 3130703 Practical-List
DBMS 3130703 Practical-List
DBMS 3130703 Practical-List
COMPUTER ENGINEERING-BE-Sem-3
PRACTICAL LIST
DEPOSIT
ACTNO CNAME BNAME AMOUNT ADATE
100 ANIL VRCE 1000.00 1-MAR-95
101 SUNIL AJNI 5000.00 4-JAN-96
102 MEHUL KAROLBAGH 3500.00 17-NOV-95
104 MADHURI CHANDI 1200.00 17-DEC-95
105 PRMOD M.G.ROAD 3000.00 27-MAR-96
106 SANDIP ANDHERI 2000.00 31-MAR-96
107 SHIVANI VIRAR 1000.00 5-SEP-95
108 KRANTI NEHRU PLACE 5000.00 2-JUL-95
109 MINU POWAI 7000.00 10-AUG-95
BRANCH
VRCE NAGPUR
AJNI NAGPUR
KAROLBAGH DELHI
CHANDI DELHI
DHARAMPETH NAGPUR
M.G.ROAD BANGLORE
ANDHERI BOMBAY
VIRAR BOMBAY
NEHRU PLACE DELHI
POWAI BOMBAY
CUSTOMERS
ANIL CALCUTTA
SUNIL DELHI
MEHUL BARODA
MANDAR PATNA
MADHURI NAGPUR
PRAMOD NAGPUR
SANDIP SURAT
SHIVANI BOMBAY
KRANTI BOMBAY
NAREN BOMBAY
BORROW
LOANNO CNAME BNAME AMOUNT
201 ANIL VRCE 1000.00
206 MEHUL AJNI 5000.00
311 SUNIL DHARAMPETH 3000.00
321 MADHURI ANDHERI 2000.00
375 PRMOD VIRAR 8000.00
481 KRANTI NEHRU PLACE 3000.00
(iii) From the above given tables perform the following queries:
emp_no Number(3)
emp_name Varchar2(30)
emp_sal Number(8,2)
emp_comm Number(6,1)
dept_no Number(3)
(1) Write a query to display the current date. Label the column Date
(2) 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
(3) Modify your query no (2) to add a column that subtracts the old salary
from the new salary. Label the column Increase
(4) 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.
(5) Write a query that produces the following for each employee:
<employee last name> earns <salary> monthly
(6) Display the name, hire date, number of months employed and day of the
week on which the employee has started. Order the results by the day
of the week starting with Monday.
(7) Display the hiredate of emp in a format that appears as Seventh of June
1994 12:00:00 AM.
(8) Write a query to calculate the annual compensation of all employees
(sal+comm.).
(1) List total deposit of customer having account date after 1-jan-96.
(2) List total deposit of customers living in city Nagpur.
(3) List maximum deposit of customers living in bombay.
(4) Display the highest, lowest, sum, and average salary of all employees.
Label the columns Maximum, Minimum, Sum, and Average, respectively.
Round your results to the nearest whole number.
(5) Write a query that displays the difference between the highest and
lowest salaries. Label the column DIFFERENCE.
(6) Create a query that will display the total number of employees and, of
that total, the number of employees hired in 1995, 1996, 1997, and 1998
(7) Find the average salaries for each department without displaying the
respective department numbers.
(8) Write a query to display the total salary being paid to each job title,
within each department.
(9) Find the average salaries > 2000 for each department without displaying
the respective department numbers.
(10) Display the job and total salary for each job with a total salary amount
exceeding 3000, in which excludes president and sorts the list by the
total salary.
(11) List the branches having sum of deposit more than 5000 and located in
city bombay.
(1) Write a query to display the last name and hire date of any employee in
the same department as SCOTT. Exclude SCOTT
(2) Give name of customers who are depositors having same branch city of
mr. sunil.
(3) Give deposit details and loan details of customer in same city where
pramod is living.
(4) Create a query to display the employee numbers and last names of all
employees who earn more than the average salary. Sort the results in
ascending order of salary.
(5) Give names of depositors having same living city as mr. anil and having
deposit amount greater than 2000
(6) Display the last name and salary of every employee who reports to ford.
(7) Display the department number, name, and job for every employee in
the Accounting department.
(8) List the name of branch having highest number of depositors.
(9) Give the name of cities where in which the maximum numbers of
branches are located.
(10) Give name of customers living in same city where maximum
depositors are located.