如何解决以下问题 [英] how to solve follwing queries
本文介绍了如何解决以下问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以工资等级显示员工详细信息。
列出编号。明智的员工。
显示雇员的工资等级,没有。员工薪水在2000到5000之间。
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.
推荐答案
我们不做你的功课:这是有原因的。它就是为了让你思考你被告知的事情,并试着理解它。它也在那里,以便您的导师可以识别您身体虚弱的区域,并将更多的注意力集中在补救措施上。
亲自尝试,你可能会发现它不是和你想的一样困难!
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!
这看起来像是一个功课。如果您不熟悉SQL,请参阅以下在线教程。
http://www.sqlcourse。 com / index.html [ ^ ]
和
http://www.sqlcourse2.com/index.html [ ^ ]
这些教程有一个在线SQL解释器和练习,让您练习所学的内容。一旦你完成了教程,你应该能够毫不费力地解决你的问题。
如果你被困在任何地方,请随时问我们,但请不要让我们做你的工作并给予你你的解决方案。
祝你好运。
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.
嗨
解决这个问题你需要按照以下步骤做作业:
1-设计数据库
2-在数据库中输入数据:例如我设计了一个样本对你来说
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-现在,您必须尝试编写查询获取信息:
例如:
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.
这篇关于如何解决以下问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文