Saturday, June 6, 2020

28. Insert a record in Project table which violates referential integrity constraint with respect to Department number. Now remove the violation by making necessary insertion in the Department table.(COMPANY DATABASE NAVATHE BOOK)

28. Insert a record in Project table which violates referential integrity constraint with respect to Department number. Now remove the violation by making necessary insertion in the Department table.(COMPANY DATABASE NAVATHE BOOK)

27. For each department having more than 10 employees, retrieve the department no, no of employees(COMPANY DATABASE NAVATHE BOOK) drawing more than 40,000 as salary.

27. For each department having more than 10 employees, retrieve the department no, no of employees(COMPANY DATABASE NAVATHE BOOK) drawing more than 40,000 as salary.


26. Change the location and controlling department number for all projects having more than 5 employees to „Bellaire‟ and 6 respectively.(COMPANY DATABASE NAVATHE BOOK)

26. Change the location and controlling department number for all projects having more than 5 employees to „Bellaire‟ and 6 respectively.(COMPANY DATABASE NAVATHE BOOK)



25. For each project, retrieve the project number, the project name, and the number of employees who work on that project.(COMPANY DATABASE NAVATHE BOOK)

25. For each project, retrieve the project number, the project name, and the number of employees who work on that project.(COMPANY DATABASE NAVATHE BOOK)


24. For each department, retrieve the department number, the number of employees in the department, and their average salary.(COMPANY DATABASE NAVATHE BOOK)

24. For each department, retrieve the department number, the number of employees in the department, and their average salary.(COMPANY DATABASE NAVATHE BOOK)


23. Select the names of employees whose salary is greater than the average salary of all employees in department 10.(COMPANY DATABASE NAVATHE BOOK)

23. Select the names of employees whose salary is greater than the average salary of all employees in department 10.(COMPANY DATABASE NAVATHE BOOK)


22. Find the sum of the salaries and number of employees of all employees of the „Marketing‟ department, as well as the maximum salary, the minimum salary, and the average salary in this department.(COMPANY DATABASE NAVATHE BOOK)

22. Find the sum of the salaries and number of employees of all employees of the „Marketing‟ department, as well as the maximum salary, the minimum salary, and the average salary in this department.(COMPANY DATABASE NAVATHE BOOK)


21. Find the sum of the salaries of all employees, the maximum salary, the minimum salary, and the average salary. Display with proper headings.(COMPANY DATABASE NAVATHE BOOK)

21. Find the sum of the salaries of all employees, the maximum salary, the minimum salary, and the average salary. Display with proper headings.(COMPANY DATABASE NAVATHE BOOK)


20. Retrieve the employee numbers of all employees who work on project located in Bellaire, Houston, or Stafford.(COMPANY DATABASE NAVATHE BOOK)

20. Retrieve the employee numbers of all employees who work on project located in Bellaire, Houston, or Stafford.(COMPANY DATABASE NAVATHE BOOK)


19. Retrieve the name of each employee who has a dependent with the same first name and same sex as the employee.(COMPANY DATABASE NAVATHE BOOK)

19. Retrieve the name of each employee who has a dependent with the same first name and same sex as the employee.(COMPANY DATABASE NAVATHE BOOK)