CA204 DBMSLab
CA204 DBMSLab
CA204 DBMSLab
emp(empno,ename,job,mgr,hiredate,sal,comm,deptno),
dept(deptno,dname,loc)
2. List all employee names along with their salaries from emp table.
3. List all department numbers, employee numbers and their managers numbers in descending
6. List the name and salary of the employees whose salary is more than 1000.
9. List the details of the employees who have joined before the end of September 81.
11. List the names of employees whose employee number are 7369, 7521, 7839, 7934, 7788.
12. List the employee details not belonging to the department 10, 30, and 40.
13. List the employee name and salary, whose salary is between 1000 and 2000.
14. List the employee names, who are not eligible for commission.(salary having >15,000 eligible
for commission)
16. List the details of employees, whose salary is greater than 2000 and commission is NULL.
17. List the employees whose names start with an “S” (not”s”).
18. List the name, salary and PF amount of all the employees(PF is calculated as 10% of salary).
20. List the employee name, salary, job and Department no descending order of Department No
and salary.
23.Display name, and sal and commission of all employees whose monthly salary is greater
25. Generate a statement which prompts the user at runtime. The intention is to display
26. Define a variable representing an expression used to calculate total annual remuneration. Use
the variable in a statement which finds all employees who earn $30000 a year or more.
27. List all the employees name and salaries increased by 15% and expressed as a whole
number of dollars.
Page 75 of 243
SMITH CLERK
ALLEN SALESMAN
SMITH ( Clerk)
ALLEN ( Salesman)
30. Do a case sensitive search for a list of employees with a job that the user enters.
31. It has been discovered that the sales people in dept. 30 are not all male. Please produce the
Followingoutput.
33. Display each employees name, hiredate and salary review date. Assume salary review date
34. Print list of employees displaying just salary, if more than 1500. If exactly 1500 display “ On
35. Write a query which returns DAY of the week ( i.e. MONDAY) for any date entered in the
format DD/MM/YY.
38. Find the maximum, minimum, and average salaries of all employees.
39. List the maximum and minimum salary of each job type.
41. Find the average salary and average total remuneration of each job type. Remembers sales man
earn commission.
42. Find out the difference between highest and lowest salary.
43. Find all department s which have more than three employees.
45. List lowest paid employee working for each Manager. Exclude any groups where the minimum
46. Produce a list showing employees ‘salary grade’.(> 10000 A, >10000 &<20000 B, >20000 C)
49. List the employees name, job, salary, grade and department for everyone in the company except
50. List the following details of employees who earn $36000 a year or who are clerks.
51. Display all employees who earn less than their managers.
52. Display all employees by name and eno along with their managers name and number.
54. Find the job that was files in the first half of 1983 and the name job that was filled in the same
period in 1984.
55. Find all employees who have joined before their manager.
Page 76 of 243
56. Find the employees who earn the highest salary in each job, type, sort in descending order
of salary.
57. Find the employees who earn the minimum salary for their job, Display the result in
58. Find the most recently hired employees in the department. Order by hiredate.
59. Show the details of any employee who earns a salary greater than the average for their
department. Sort in department number order.