حاول حل هذة الأسئلة العشرة متدرجة المستوى
تذكر زز الحل فى جملة sqlواحدة
1. Find the employee(s) who earn the highest salary in each job type Sort in descending salary order.. JOB ENAME SAL PRESIDENT KING 5 008.013 ANALYST SCOTT 3 000.00 ANALYST FORD 3 000.00 MANAGER JONES 2 975.00 SALESMAN ALLEN 1 600.00 CLERK MILLER 1 300.00 6 records selected. -------------------------------------------- 2. Find the employees who earn the minimum salary for their job. Displav the result in ascending order of salary. ENaMe JOB SAL SMITH CLERK 800 . ... 7 records selected. -------------------------------------------- 3. Find the most recently hired employees in each department. Order by hire date. DEFTNO ENflHE HI REBATE 20 ADAHS 04-JUN-84 10 KING 09-JUL-84 30 JAMES 23-JUL-B4 -------------------------------------------- 4. Show the following details for any employee who earns a salary greater than the average for their department. Sort in department number order. EnaME SALARY DEFTNO KING 5009 19 JONES 2975 29 SCOTT 3909 20 FORD 3999 20 ALLEN 1609 30 BLAKE 2859 39 6 records selected. -------------------------------------------- 5. List all the departments where there are no employees. (Using a subquerv this time.) DEPTNO DNftME 40 OPERATIONS -------------------------------------------- 6. Display the following information for the department with the HIGHEST annual remuneration bill. DEPTNO COMPENSATION 20 130500 -------------------------------------------- 7. Who are the top 3 earners in the company? Display their name and salary. ENAME SaL SCOTT 3,000.00 KING 5,000.09 FORD 3,900.00 -------------------------------------------- 8. In which year did most people join the company? Display the year and number of employees. YEAR NUMBER OF EMPS 1984 8 -------------------------------------------- 9. Modify question 4 to also display the average salary figure for the department. NAmE SAL depTNO dEPTAVG ALLEN L600 30 1566.66o6 . .. -------------------------------------------- 10. Write a query to display an '*' against the row of the most recently hired employee. Display ENAME, HIREDATE and column (maxdate) showing ""'.