Monday 4 March 2024

SQL Questions-1

 1)Display the names of employees whose name starts with alphabet S 

2)Display employee name from employees whose name ends with alphabet S 

3)Display the names of employees whose names have sencond alphabet A in their names 

4)Display the names of employees whose name is exactly five characters in length      

5)Display the names of employees working in department number 10 or 20 or 40 or employees working as clerks , salesman or analyst  

6)Display the list of employees who have joined the company before 30th june 90 or after 31 st dec 90

7)Display the names of employees who are working in the company for the past 5 years 

8)Display current date

9)Display the names of employees who are not working as SALESMAN or CLERK or ANALYST 

10)Display the total number of employees working in the company 

11)Display the total salary and total commission to all employees 

12)Display the maximum salary from emp table 

13)Display the minimum salary from emp table 

14)Display the average salary from emp table 


=============================================================


1)List the employees working in "RESEARCH"department.

2)List the employees who are located in New York and Chicago

3)Display the department name in which ANALYSTS are working.

4)Display the employees who are reporting JONES

5)Display all the employees who are reporting to JONES manager

6)Display all the managers in SALES and ACCOUNTING department.

7)Display all the employees names in RESEARCH and SALES department who are having at least one person reporting to them.

8)Display all employees who do not have any reportees.

9)Display employees who are havng atlease two reporting 

10)List the department names which are having more than  5 employees.

11)List department name having atleast 3 SALESMAN.

12)List employees from research and accounting having atleast 2 reporting.

13)Display second max salary

14)Dispaly the 4th Max salary.                                             

15)Display  5th max salary --Answer for nth max salary.


No comments:

Post a Comment