SQL query

5 pts.
MySQL admin
MySQL query
I have two database tables of employee where employee table maintains EMPNO,ENAME,JOB,MANAGER,HIREDATE,SALARY,COMMISION ,DEPTNO and department table maintais details of DEPTNO,DNAME,LOCATION. questions are : 1)Display the first four rows of employee table. 2)Display the empno,ename from row 2 to row 5. 3) Display the empno,ename for employee of 2nd row 4) Display details of all even rows. 5)Display each empno and his experience in years. 6) Display details of employees joined between 1981 to 1985. 7)Display details of employees who joined in any month between July and October. 8)Display each empno and his total annual income including commission. 9)Display each empno and his job title with the following decoding. MANAGER-M,CLERK-C,ANALYST-A,SALESMAN-S,PERSIDENT-P. department table consist of rows like DEPTNO-10,DNAME-ACCOUNTING,LOCATION-NEWYORK ... I am giving you sample table to get an idea of what actually the table fields consists of . and an example row of employee table is as follows: EMPNO-7369,ENAME-SMITH,JOB-CLERK,MGR-7902,HIREDATE- 17-DEC-80,SALARY-800,COMMISSION-300,DEPTNO-20. also some of commission values for some employee is NULL value. Sir , i need queries for these questions we have 20 questions and we got 11 queries and we are not getting remaining 9 queries which has mentioned above though we have tired those queries but was not able to get correct one. So, plz kindly guide us with solutions as soon as possible. Thank you.

Software/Hardware used:

Answer Wiki

Thanks. We'll let you know when a new response is added.

Thank you for visiting ITKE.

We are happy to help you with solving specific IT questions, but need as
much information as possible to do so. Let us know about the problem you
are trying to solve, how you are approaching it and what work you’ve
done so far, and we can help guide you in the right direction.

-For questions 1-4, you might need to use the LIMIT clause, and/or some trick to add row numbers to your query results (for example SELECT @r:=@r+1 AS rownum, …).
-Questions 5-9 are fairly simple, and if you are not able to answer them, you really need to study.

Discuss This Question: 1  Reply

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • TomLiotta
    Homework cannot be supplied. However, if you show work that has been tried, we can point out potential flaws and help with explanations. We might be able to describe why a particular query doesn't work and act as guides to correct answers. But you need to do the work and show what has been done. Tom
    125,585 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: