Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
1.67/5 (6 votes)
See more:
Display employee details with salary grades.

List out the no. of employees on grade wise.

Display the employ salary grades and no. of employees between 2000 to 5000 range of salary.
Posted
Comments
Abhishek Pant 3-Jan-13 2:47am    
looks like yesterday homework todays question.What have yoou tried?[^]Do it your self first.Also Improve your question
Prasad_Kulkarni 3-Jan-13 2:55am    
..and what you've tried so far?
phil.o 3-Jan-13 5:02am    
Great requirements !

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!
 
Share this answer
 
This looks like a homework. If you are not familiar with SQL go through the below online tutorials.
http://www.sqlcourse.com/index.html[^]
and
http://www.sqlcourse2.com/index.html[^]
These tutorials have an on-line SQL interpreter and exercises allowing you to practice what you have learnt. Once you complete the tutorials you should be able to solve your question without any hassle.
Feel free to ask us if you get stuck anywhere, but please don't ask us to do your work and give you the solution.

Good luck.
 
Share this answer
 
Hi
for solving this homework you must following bellow steps:

1- Design your database
2- Enter data in your database: for example I design a sample for you


Employee				
ID      Number	FirstName	LastName	Nationality
-----------------------------------------------------------------------------------
1	0001	Reza		Alipour		Iran
2	0002	Ganesh		Kasar		USA


Company			
ID	Name		Field		Location
-----------------------------------------------------------------------------------
1	Microsoft	Software	USA
2	Google		Software	USA


Position			
ID	Title			Department	Task
---------------------------------------------------------
1	Database Administrator	Support		Maintenance DB
2	Software Developer	Develop		Develop App
3	Database Developer	R&D		Develop Db
4	IT Expert		Network		Maintenance Network


Job						
ID   CompanyID	PositionID   EmployeeID	StartDate    EndDate	  Salary
------------------------------------------------------------------------
1    1		1	     1		2010-01-01   2010-12-29	  8000
2    2		2	     1		2011-01-01   Null	  10000
3    1		3	     2		2001-01-01   2005-12-29	  8000
4    2		4	     2		2006-01-01   Null	  1000



3- Now, you must try to write your queries for getting information:
For example:

Select	Employee.Number		As 	EmployeeNumber	,
	Employee.FirstName	As	FirstName	,
	Employee.LastName	As	LastName	,
	Employee.Nationality	As	Nationality	,
	Position.Title		As	Position	,
	Job.StartDate		As	StartJob	,
	Job.EndDate		As	EndJob		,
	Job.Salary		As	Salary

	From	Employee
			Inner Join
		Job
			On	Employee.ID	=	Job.EmployeeID
			Inner Join
		Position
			On	Position.ID	=	Job.PositionID



Now you can write any query for this Database.

I hope it's helpful.
 
Share this answer
 
v3

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