Click here to Skip to main content
15,920,005 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have three tables
Employee (TB1) Employee Name(TB2) Manager(TB3) Department(TB4)
ID Ecode Dept ID Ename Mcode ID deptName
1 10 1 1 raja NULL 1 Admin
2 20 2 2 siva 10 2 prodn
3 30 3 3 kamal 60 3 Accounts
4 40 5 4 ramu 100


1) List of employees who are managers
2) List of employees who are not managers
3) Total number of employees in each department with department name
4) Total number of manager in each department with department name
5) Employee whose name is not defined
6) Employee whose department id is not valid
Posted
Updated 28-Jan-14 3:45am
v2
Comments
gettgotcha 28-Jan-14 10:18am    
What have you done till now, is there any issue for writing queries to retrieve the desired result?
Peter Leow 28-Jan-14 10:19am    
This is not a question.
thatraja 28-Jan-14 10:30am    

1 solution

We are not helping you if we do your homework, you should do it yourself as it is not that difficult. Take reference from here: SQL tutorial[^]
CP helps people to learn. We neither do their assignments/homeworks/projects nor supply source code.
what-have-you-tried[^]
If you encounter any difficulties with your coding, always consult Google first, everything else fails, then visit CP and ask questions related to specific issues.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900