Question: Consider the below two tables for reference Employeelnfo Table table [ [ EmpID , EmpFname,EmpLname,Department,Project,Address,DOB,Gender ] , [ 1 , Sanjay,Mehra,HR , P 1

Consider the below two tables for reference
Employeelnfo Table
\table[[EmpID,EmpFname,EmpLname,Department,Project,Address,DOB,Gender],[1,Sanjay,Mehra,HR,P1,Hyderabad(HY,01/12/1976,M],[2,Ananya,Mishra,Admin,P2,Delhi(DEL),02/05/1968,F],[3,Sonia,Kulkarni,HR,P1,Hyderabad(HY,02/05/1992,F]]
EmployeePosition Table
\table[[EmpID,EmpPosition,DateOfJoining,Salary],[1,Manager,0105?2022,500000],[2,Executive,0205?2022,75000],[3,Manager,0105?2022,90000]]
a) Write q query to find all the employees whose salary is between 50000 to 100000.
b) Write a query to find the names of employees that begin with 'S'
c) Write a query to fetch all employees who also hold the managerial position.
d) Write a query to fetch the department-wise count of employees sorted by department's count in ascending order
e) Write a query to retrieve the list of employees working in the same department.
 Consider the below two tables for reference Employeelnfo Table \table[[EmpID,EmpFname,EmpLname,Department,Project,Address,DOB,Gender],[1,Sanjay,Mehra,HR,P1,Hyderabad(HY,01/12/1976,M],[2,Ananya,Mishra,Admin,P2,Delhi(DEL),02/05/1968,F],[3,Sonia,Kulkarni,HR,P1,Hyderabad(HY,02/05/1992,F]] EmployeePosition

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!