Naresh I Technologies
Test Paper
B – 53
1. Write an SQL query to generate a report showing from EMP table
- Department Number
- Number of Employees
- Total Salary
- Average Salary
2. Write a query to display duplicate records from the following EMP111 table?
SQL>select * from EMP111;
EMPNO ENAME
----------- ----------------
1 SURYA
2 ANUSHKA
3 ANUSHKA
4 GOWTHAM
5 SURYA
6 SATYA
3. Write a Query to display top-3 Highest Employee Salaries from EMP table?
4. Write a Query to display Employee Details and corresponding each Employee Dept. Details
5. Write a Query to find who are working in CHICAGO, DALLAS locations from EMP, DEPT tables?
6. Display all employees and their department names, ensuring that employees without
Departments are also displayed from EMP table?
7a. Write a Query to display Employee Date of Joining’s with Descending Order from EMP table?
7b. Write a query to display all the job roles in the company from EMP table
8A. Write a Query display employees who are getting more salary then the average salary from
EMP table?
8B. Write a Query to find Senior most employee details from EMP table?
9. Write a query to find 2nd Highest Salary Employee from EMP table?
10. Write a query to display departments having more than 3 employees from EMP table?
11. Write a query to display last 2 rows from EMP table?
12. Write a query to display the employee names and their manager names from EMP table
By using self join?
13. Write a query to delete duplicate records from the above emp111 table?
14. Create a Book_Mas table with Book_id(PK), Book_name, & Author_Name
15. Create a Book_Issue table with Tno, Tdate, Std_id, Book_id(FK) , DoI, & Dor