SQL Server Practical Scenario

Manager

ManagerID(PK)

ManagerName

YearOfExperience

Domain

 

Employee

EmpID(PK)

EmpName

EmpAddress

EmpContact

EmpCity

EmpEMailID
EmpDOJ

ReportingManager(FK)

1.    Write the query to display Employee Name and Corresponding Manager Name.(Use schema1)

2.    Write the query to find total number of employee under the each Manager Name and use the alias name "Total Number of Employee".(Use Schema1)

3.    Write the query to retrieve all the employee data whose Domain is "Java". (Use Schema1).

4.    Write the queries to display total Number of Employee are in Chennai City. (Use Schema1).

5.    Write the query to display the Manager Name and Domain Whose Year of Experience is more than 7 and less than 12. (Use Schema1).


  1. Write the query to display Employee Name and third three letter of the Employee Address.
  2. Write the query to display Employee City,and whose shore code is CHN for Chennai,PUN for Pune,BNG for Bangalore,CON for Cochin, Others for remaining city, use alias name as CityShortcode. 
  3. Write the query to retrieve the Employee Name who are having the valid EMailID. (To check Valid Mail Id, @ and .(dot) in the EMail.
  4. Write the query to display the ManagerName who is haviing more than 4 year of experience.
  5. Write the query to display the Employee Name, Manager Name and Domain who are all joined after Feb-2012.
Ebook Download
View all
Learn
View all