Вы находитесь на странице: 1из 2

Assignment #7

============

1. LIST ALL EMPLOYEES IN THE ORDER OF THEIR JOBS


2. LIST ALL EMPLOYEES IN THE DESCENDING ORDER OF THEIR DEPARTMENT NUMBERS
3. LIST ALL EMPLOYEES OF DEPT 20
4. LIST ALL EMPLOYEES WHO ARE ANALYST
5. LIST ALL EMPLOYEES WHO ARE GETTING MORE THAN 2000
6. LIST ALL EMPLOYEES WHO WERE HIRED BEFORE THE DATE EQUAL TO YOUR DATE OF
BIRTH
7. LIST ALL EMPLOYEES WHO ARE GETTING SALARIES BETWEEN 1000 AND 3000
8. LIST ALL EMPLOYEES WHO ARE SALESMAN & GETTING LESS THAN 2000
9. LIST ALL EMPLOYEES WHO ARE WORKING EITHER WORKING IN DEPT 10, OR 20 OR
CLERKS OF 30
10. LIST ALL EMPLOYEES WHO ARE NOT WORKING IN DEPT 20 AND ARE GETTING SALARIES
BELOW 2000
11. LIST ALL EMPLOYEES WHO ARE WORKING IN EITHER DEPT 10 OR 20 AND HAVING FIRST
CHARACTER OF THEIR NAME "N" OR "Q"
12. LIST ALL EMPLOYEES WHO ARE WORKING IN 20 AND HAVING FIRST CHARACTER OF THEIR
NAME "N" OR "D"
13. LIST ALL EMPLOYEES CONTAINING KHAN IN THEIR NAMES AND GETTING BELOW 3000
14. LIST ALL MANAGERS WHO WERE HIRED BETWEEN 04-DEC-81 AND 12-FEB-84
15. LIST ALL DISTINCT JOBS
16. LIST ALL DISTINCT DEPARTMENTS
17. LIST ALL TABLES IN YOUR ACCOUNT
18. LIST CLERKS OF DEPT 20 OR SALESMAN OF DEPT 10
19. LIST ALL CLERKS WHO ARE WORKING IN DEPT 10 OR 20
20. DISPLAY SYSTEM DATE USING SELECT CLAUSE.
21. CREATE A QUERY TO DISPLAY THE NAMES AND SALARY OF EMPLOYEES EARNING MORE
THAN $25000 PER ANUM.
22. CREATE A QUERY TO DISPLAY THE EMPLOYEE NAMES AND DEPARTMENT NUMBER FOR THE
EMPLOYEE NUMBER 7566.
23. DISPLAY THE NAMES AND SALARY FOR ALL EMPLOYEES WHOSE SALARY IN NOT IN THE
RANGE OF 1500 AND 2850.
24. DISPLAY THE EMPLOYEE NAME, JOB AND START DATE OF EMPLOYEES HIRED BETWEEN
FEBRUARY 20, 1981, AND MAY 1, 1981. ORDER THE QUERY IN ASCENDING ORDER BY
START DATE.
25. LIST THE NAME AND SALARY OF THOSE EMPLOYEES WHO EARN MORE THAN 1500 AND ARE
IN THE DEPARTMENT 10 OR 30. LABEL THE COLUMNS EMPLOYEES AND MONTHLY SALARY,
RESPECTIVELY.
26. DISPLAY THE NAMES AND HIREDATE OF THE EMPLOYEES WHO WERE HIRED IN 1982.
27. DISPLAY THE NAME AND JOB TITLE OF THE EMPLOYEES WHO HAVE NO ANY BOSS.
MANAGER.
28. DISPLAY THE NAMES, SALARY AND COMMISSION FOR THOSE EMPLOYEES WHO EARN
COMMISSIONS. SORT DATA IN DESCENDING ORDER OF SALARY AND COMMISSIONS.
29. DISPLAY THE NAMES OF ALL THOSE EMPLOYEES WHO HAVE �A� AS A THIRD LETTER IN
THEIR NAMES.
30. DISPLAY THE NAME, JOB AND SALARY OF ALL EMPLOYEES WHOSE JOB IS CLERK OR
ANALYST AND THEIR SALARY IS NOT EQUAL TO 1000, 3000 OR 5000.
31. DISPLAY THE NAME, SALARY AND COMMISSION FOR ALL EMPLOYEES WHOSE COMMISSION
AMOUNT IS GREATER THAN THEIR SALARY INCREASED BY 10%.
32. LIST ALL EMPLOYEES WHO ARE MANAGERS.
33. LIST ALL EMPLOYEES WHO ARE EITHER MANAGER OR CLERK.
34. LIST ALL EMPLOYEES WHO ARE EITHER SALESMAN OR PRESEDENT.
35. LIST ALL EMPLOYEES WHO ARE MANAGER OF DEPTNO 10.
36. LIST ALL EMPLOYEES WHO ARE WORKING AS A SALESMAN IN DEPTNO 30.
37. LIST ALL EMPLOYEES WHO ARE NOT BELONGING TO DEPTNO 20,30,40 AND ARE NOT
MANAGER.
38. LIST ALL EMPLOYEES WHO ARE NOT PRESEDENT,ANALYST OR SALESMAN.
39. LIST ALL EMPLOYEES WHO ARE WORKING IN DEPTNO 10 AND THEIR JOB IS CLERK.
40. LIST ALL EMPLOYEES WHOSE NAME IS STARTED WITH CHARACTER �S� AND JOB IS
ANALYST.
41. LIST THOSE EMPLOYEES WHO HAVE ONLY FOUR (4) CHARACTER LONG NAME.
42. FIND THE DAY OF ALL EMPLOYEE WHEN THEY WHERE HIRED.
43. FIND THE NEXT FRIDAY AFTER THE �12-MAR-98�
44. FIND THE LAST DAY OF THE EACH HIREDATE
45. DISPLAY THE DAY OF YOUR BIRTHDAY.
46. DISPLAY THE SALARY OF EMPLOYEE AS :
IF MANAGER THEN RS.3000,
IF ANALYST THEN RS.4000,
IF PRESIDENT THEN RS.5000
OTHERWISE SALARY = RS.2000
47. FROM THE STRING � 100 PAKISTANI RUPEES � PICK 100 AND ADD 20 INTO IT.
48. DISPLAY THE DAY AFTER ONE WEEK OF HIRING IN COMPANY.
49. DISPLAY THE SALARY WITH 2 DECIMAL PLACE.
50. DISPLAY THE STRUCTURE OF ALL TABLE IN SCOTT�S SCHEMA.( HINT: USE SPOOLING
CONCEPT )