Sie sind auf Seite 1von 15

SQL-QUERIES 1. Display all the information of the EMP table? ANS) select * from emp; 2.

Display unique Jobs from EMP table? ANS) select istinct !ob from emp; 3. "ist the emps in the asc or er of their Salaries? ANS) select empno from emp or er by sal asc; 4. "ist the etails of the emps in asc or er of the Dptnos an esc of Jobs? ANS) SE"E#$ * %&'M ( SE"E#$ * %&'M EMP '&DE& )* SA" DES#) EMP '&DE& )* DEP$N' AS#; Select * from emp where order by deptno,job desc. 5. Display all the unique !ob +roups in the escen in+ or er? ANS)SE"E#$ D,S$,N#$ J') %&'M EMP '&DE& )* J') DES#; 6. Display all the etails of all -M+rs. ANS)SE"E#$ * %&'M EMP /0E&E J') 1 -MANA2E&.; 7. "ist the emps 3ho !oine before 45647 ANS)SE"E#$ * %&'M EMP /0E&E 0,&EDA$E 8 .94:JAN:4564.; 8. "ist the Empno; Ename; Sal; Daily sal of all emps in the asc or er of Annsal7 ANS)SE"E#$ EMPN';ENAME;SA";SA"<=9 %&'M EMP 9. Display the Empno; Ename; !ob; 0ire ate; E>p of all M+rs Ans)SE"E#$ EMPN';ENAME;J');0,&EDA$E;(S*SDA$E:0,&EDA$E)<=?@ %&'M EMP /0E&E J') 1 -MANA2E&.; 10. "ist the Empno; Ename; Sal; E>p of all emps 3orAin+ for M+r B?567 ANS)SE"E#$ EMPN';ENAME;SA";(S*SDA$E:0,&EDA$E)<=?@ ECP %&'M EMP /0E&E M2&1B?56; 11. Display all the etails of the emps 3hose #omm7 ,s more than their Sal7 ANS)SE"E#$ * %&'M EMP /0E&E #'MM D SA"; 12. "ist the emps in the asc or er of Desi+nations of those !oine after the secon half of 45647 ANS)select * from emp 3here hire ate bet3een .94:!ul:4564. an .=4: ec:4564. '&DE& )* M2&;

13. "ist the emps alon+ 3ith their E>p an Daily Sal is more than &s74997 Ans)SE"E#$ EMPN';S*SDA$E:0,&EDA$E %&'M EMP /0E&E SA"<=9D4997 14. "ist the emps 3ho are either -#"E&E. or -ANA"*S$. in the Desc or er7 Ans) SE"E#$ * %&'M EMP /0E&E "'/E&(J')) 1 -clerA. '& "'/E&(J')) 1 -analyst.; 15. "ist the emps 3ho !oine on 4:MA*:64;=:DE#:64;4B:DE#:64;45:JAN:69 in asc or er of seniority7 ANS)SE"E#$ * %&'M EMP /0E&E $'F#0A&(0,&EDA$E;.DD:M'N:**.) ,N (-4: MA*:64.;.=:DE#:64..4B:DE#:64..45:JAN:69.) '&DE& )* 0,&EDA$E; 16. "ist the emp 3ho are 3orAin+ for the Deptno 49 orG97 Ans) SE"E#$ * %&'M EMP /0E&E DEP$N' ,N (49;G9); 17. "ist the emps 3ho are !oine in the year 647 Ans)SE"E#$ * %&'M EMP /0E&E $'F#0A&(0,&EDA$E;.**.)1.64.; 18. "ist the emps 3ho are !oine in the month of Au+ 45697 Ans)SE"E#$ * %&'M EMP /0E&E $'F#0A&(0,&EDA$E;.M'N:**.)1.AH2:69.; 19. "ist the emps /ho Annual sal ran+in+ from GG999 an I@9997 Ans)SE"E#$ * %&M EMP /0E&E SA"*4G )E$/EEN =9999 AND @9999; 20. "ist the Enames those are haJin+ fiJe characters in their Names7 Ans)SE"E#$ ENAME %&'M EMP /0E&E "EN2$0(ENAME)1@ 21. "ist the Enames those are startin+ 3ith -S. an 3ith fiJe characters7 Ans)SE"E#$ ENAME %&'M EMP /0E&E ENAME ",EE(-KS.) AND "EN2$0(ENAME)1@; 22. "ist the emps those are haJin+ four chars an thir character must be -r.7 Ans)SE"E#$ ENAME %&'M EMP /0E&E "EN2$0(ENAME)1I AND ENAME ",EE(-FFrK.); 23. "ist the %iJe character names startin+ 3ith -S. an en in+ 3ith -0.7 Ans)SE"E#$ ENAME %&'M EMP /0E&E ENAME ",EE .SK0. AND "EN2$0(ENAME)1@;

24. "ist the emps 3ho !oine in January7 Ans)SE"E#$ EMPN' %&'M EMP /0E&E $'F#0A&(0,&EDA$E;.%MM'N$0.) ",EE .JANHA&*.; 25. "ist the emps 3ho !oine in the month of 3hich secon character is -a.7 Ans)SE"E#$ * %&M EMP /0E&E $'F#0A&(0,&EDA$E;.M'N$0.) ",EE -FAK.); 26. "ist the emps 3hose Sal is four i+it number en in+ 3ith Lero7 Ans)SE"E#$ * %&'M EMP /0E&E $'F#0A&(SA") ",EE -K99.; SE"E#$ * %&'M EMP /0E&E SA" ",EE -K99.; 27. "ist the emps 3hose names haJin+ a character set -ll. to+ether7 Ans) SE"E#$ * %&'M EMP /0E&E ENAME ",EE -K""K.; 28. "ist the emps those 3ho !oine in 69.s7 Ans)SE"E#$ * %&'M EMP /0E&E $'F#0A&(0,&EDA$E;.**.) ",EE -69.; 29. "ist the emps 3ho oes not belon+ to Deptno G97 Ans) SE"E#$ * %&'M EMP /0E&E DEP$N' N9$8D.G9.; 30. "ist all the emps e>cept -P&ES,DEN$. M -M2&N in asc or er of Salaries7 Ans) select * %&'M EMP /0E&E J') N'$ ,N (-P&ES,DEN$.;.MANA2E&.) '&DE& )* SA"; 31. "ist all the emps 3ho !oine before or after 45647 Ans)SE"E#$ * %&'M EMP /0E&E $F#0A&(0,&EDA$E;.****.) N'$ ",EE -4564.; 32. "ist the emps 3hose Empno not startin+ 3ith i+itB67 Ans)SE"E#$ * %&'M EMP /0E&E EMPN' N'$ ",EE -B6K.; 33. "ist the emps 3ho are 3orAin+ un er -M2&.7 Ans)select empno;ename from emp 3here m+r 1 (select 3here lo3er(!ob)1.mana+er.; istinct (m+r) from emp

34. "ist the emps 3ho !oine in any year but not belon+s to the month of March7 ANS)select * from emp 3here lo3er(toFchar(hire ate;.fmmonth.)) 8D -march.; 35. "ist all the #lerAs of Deptno G97 ANS) select * from 3here eptno1G9 an lo3er(!ob)1.clerA.; 36. "ist the emps of Deptno =9 or 49 !oine in the year 45647 ANS)select * from emp 3here eptno in(49;=9) an toFchar(hire ate;.yyyy.) 1 4564 37. Display the etails of SM,$07 ANS) select * from emp 3here lo3er(ename) liAe -smith.; 38. Display the location of SM,$07 ANS)select loc from ept 3here eptno 1(select eptno from emp 3here lo3er(ename) liAe -smith. 39. "ist the total information of EMP table alon+ 3ith DNAME an "oc of all the emps /orAin+ Hn er -A##'HN$,N2. M -&ESEA&#0. in the asc Deptno7 ANS) 40. "ist the Empno; Ename; Sal; Dname of all the -M2&S. an -ANA"*S$. 3orAin+ in Ne3 *orA; Dallas 3ith an e>p more than B years 3ithout receiJin+ the #omm asc or er of "oc7 41. Display the Empno; Ename; Sal; Dname; "oc; Deptno; Job of all emps 3orAin+ at #J,#A2' or 3orAin+ for A##'HN$,N2 ept 3ith Ann SalDG6999; but the Sal shoul not be1=999 or G699 3ho oesn.t belon+s to the M+r an 3hose no is haJin+ a i+it -B. or -6. in = r position in the asc or er of Deptno an esc or er of !ob7 42. Display the total information of the emps alon+ 3ith 2ra es in the asc or er7 43. "ist all the 2ra eG an 2ra e = emps7 44. Display all 2ra e I;@ Analyst an M+r7 45. "ist the Empno; Ename; Sal; Dname; 2ra e; E>p; an Ann Sal of emps 3orAin+ for Dept49 orG97 46. "ist all the information of emp 3ith "oc an the 2ra e of all the emps belon+ to the 2ra e ran+e from G to I 3orAin+ at the Dept those are not startin+ 3ith char set -'P. an not en in+ 3ith -S. 3ith the esi+n haJin+ a char -a. any 3here !oine in the year 4564 but not in the month of Mar or Sep an Sal not en 3ith -99. in the asc or er of 2ra es7 47. "ist the etails of the Depts alon+ 3ith Empno; Ename or 3ithout the emps7 48. "ist the etails of the emps 3hose Salaries more than the employee )"AEE7

49. "ist the emps 3hose Jobs are same as A""EN7 50. "ist the emps 3ho are senior to Ein+7 51. "ist the Emps 3ho are senior to their o3n M2&S7 (select
e7ename;e47ename from emp e ;emp e4 3here e7m+r1e47empno an roun (monthsFbet3een(sys ate;e7hire ate)<4G)Droun (monthsFbet3een(sys ate;e47hire ate)<4G))

52. "ist the Emps of Deptno G9 3hose Jobs are same as Deptno497 (select e7ename;e7 eptno;e7!ob from emp e ; ept
e7!ob in (select !ob from emp 3here eptno149);) 3here e7 eptno1 7 eptno an 7 eptno1G9 an

53. "ist the Emps 3hose Sal is same as %'&D or SM,$0 in esc or er of Sal7
select ename;sal from emp 3here sal in(select sal from emp 3here ename in (OSM,$0O;O%'&DO));

54. "ist the emps /hose Jobs are same as M,""E& or Sal is more than A""EN7
SE"E#$ ename; J');SA" %&'M EMP 3here sal D(select sal from emp 3here lo3er(ename)1OallenO) or !ob1(select !ob from emp 3here lo3er(ename)1OmillerO)

55. "ist the Emps 3hose Sal is D the total remuneration of the SA"ESMAN7
select ename;sal;!ob from emp 3here salD(select sum(nJlG(comm;salPcomm;sal)) from emp 3here lo3er(!ob)1OsalesmanO)

56. "ist the emps 3ho are senior to )"AEE 3orAin+ at #0,#A2' M )'S$'N7
select e7ename; 7loc from emp e ; ept 3here e7hire ate 8(select hire ate from emp 3here ename 1O)"AEEO) AND 7loc in (O#0,#A2'O;O)'S$'NO)

57. "ist the Emps of 2ra e =;I belon+s to the ept A##'HN$,N2 an &ESEA&#0 3hose Sal is more than A""EN an e>p more than SM,$0 in the asc or er of ECP7
SE"E#$ E7ENAME;E7SA";&'HND(M'N$0SF)E$/EEN(S*SDA$E;E70,&EDA$E)<4G) AS QECPQ ;D7DNAME;S72&ADE %&'M EMP E; DEP$ D;SA"2&ADE S /0E&E S72&ADE ,N (=;I) AND D7DNAME ,N (OA##'HN$,N2O;O&ESEA&#0O) AND SA" D(SE"E#$ SA" %&'M EMP /0E&E ENAME1OA""ENO) AND &'HND(M'N$0SF)E$/EEN(S*SDA$E;E70,&EDA$E)<4G)D(SE"E#$ &'HND(M'N$0SF)E$/EEN(S*SDA$E;0,&EDA$E)<4G) %&'M EMP /0E&E ENAME1OSM,$0O) '&DE& )* QECPQ

58. "ist the emps 3hose !obs same as SM,$0 or A""EN7

SE"E#$ * %&'M EMP /0E&E J') ,N (SE"E#$ J') %&'M EMP /0E&E ENAME ,N(OSM,$0O;OA""ENO))

59. /rite a Ruery to isplay the etails of emps 3hose Sal is same as of a) Employee Sal of EMP4 table7 b) S Sal of any M+r of EMPG table7 c) $he sal of any person 3ith e>p of @ years belon+s to the sales ept of emp= table7 ) Any +ra e G employee of empI table7 e) Any +ra e G an = employee 3orAin+ fro sales ept or operations ept !oine in 657 (**************) 60. Any !obs of eptno 49 those that are not foun in eptno G97
SE"E#$ E7J');D7DNAME %&'M EMP E ;DEP$ D /0E&E D7DEP$N'149 AND E7DEP$N'1D7DEP$N' AND E7J') N'$ ,N (SE"E#$ E7J') %&'M EMP /0E&E E7DEP$N'1G9)

61. "ist of emps of emp4 3ho are not foun in empG7 (***********************) 62. %in the hi+hest sal of EMP table7
SE"E#$ MAC(sa") %&'M EMP

63. %in

etails of hi+hest pai employee7

64. %in the hi+hest pai employee of sales epartment7


SE"E#$ * %&'M EMP /0E&E SA" 1 (SE"E#$ MAC(sA") %&'M EMP)

65. "ist the most recently hire emp of +ra e= belon+s to location #0,#A2'

65. 7 66. "ist the employees 3ho are senior to most recently hire un er Ain+7 67. "ist the employee 3orAin+

etails of the employee belon+s to ne3yorA 3ith +ra e = to @ e>cept

-P&ES,DEN$. 3hose salD the hi+hest pai employee of #hica+o in a +roup 3here there is mana+er an analyst not 3orAin+ un er Ain+7 68. "ist the etails of the senior employee belon+s to 45647 69. "ist the employees 3ho !oine person of the year 45647 in 4564 3ith the !ob same as the most senior

70. "ist the most senior empl 3orAin+ un er the Ain+ an +ra e is more then =7 71. %in the total sal +iJen to the M2&7 72. %in the total annual sal to istribute !ob 3ise in the year 647 73. Display total sal employee belon+in+ to +ra e =7 74. Display the aJera+e salaries of all the clerAs7 75. "ist the employeein ept G9 3hose sal is Dthe aJera+e sal 9f ept 49 emps7 76. Display the number of employee for each !ob +roup eptno 3ise7 77. "ist the mana+e rno an the number of employees 3orAin+ for those m+rs in the ascen in+ M+rno7 78. "ist the epartment etails 3here at least t3o emps are 3orAin+ 79. Display the 2ra e; Number of emps; an ma> sal of each +ra e7 80. Display name; +ra e; No7 of emps 3here at least t3o emps are clerAs7 81. "ist the etails of the epartment 3here ma>imum number of emps are 3orAin+7

82. Display the emps 3hose mana+er name is !ones7 83. "ist the employees 3hose salary is more than =999 after +iJin+ G9K increment7 84. "ist the emps 3ith ept names7 85. "ist the emps 3ho are not 3orAin+ in sales ept7 86. "ist the emps name ; ept; sal an comm7 %or those 3hose salary is bet3een G999 an @999 3hile loc is #hica+o7

87. "ist the emps 3hose sal is +reater than his mana+ers salary 88. "ist the +ra e; EMP name for the eptno 49 or eptno =9 but sal +ra e is not I 3hile they !oine the company before .=4: ec:6G.7 89. "ist the name !ob; name; location for those 3ho are 3orAin+ as M2&S7 90. "ist the emps 3hose m+r name is !ones an also list their mana+er name7 91. "ist the name an salary of for if his salary is equal to hisal of his +ra e7 92. "it the name; !ob; name ;sal; +ra e ept 3ise7 93. "ist the emp name; !ob; sal; +ra e an basis of hi+hest sal7 name e>cept clerAs an sort on the

94. "ist the emps name; !ob; !ob an mana+er 3ho are 3ith out mana+er7 95. "ist the names of the emps 3ho are +ettin+ the hi+hest sal ept 3ise7 96. "ist the emps 3hose sal is equal to the aJera+e of ma> an minimum7 97. "ist the no7 of emps in each epartment 3here the no7 is more than =7 98. "ist the names of epts7 /here atleast = are 3orAin+ in that epartment7 99. "ist the mana+ers 3hose sal is more than his employess aJ+ salary7 100. "ist the name;salary;comm7 %or those employees 3hose net pay is +reater than or equal to any other employee salary of the company7 101. "ist the emp 3hose sal8his mana+er but more than any other mana+er7 102. "ist the employee names an his aJera+e salary epartment 3ise7 103. %in out least @ earners of the company7 (select ro3num;ename;sal from (select ename;sal from emp or er by sal esc) 3here ro3num 81@) 104. %in oput emps 3hose salaries +reate than salaries of their mana+ers7 105. "ist the mana+ers 3ho are not 3orAin+ un er the presi entr7 106. "ist the recor s from emp 3hose eptno isnot in ept7 107. "ist the Name ; Salary; #omm an Net Pay is more than any other employee7

108. "ist the Enames 3ho are retirin+ after =4:Desc:65 the ma> Job perio is G9*7 109. "ist those Emps 3hose Salary is o Jalue7

110. "ist the emp.s 3hose Salary contain = i+its7 111. "ist the emps 3ho !oine in the month of DE#7 112. "ist the emps 3hose names contains -A.7 113. "ist the emps 3hose Deptno is aJailable in his Salary7 114. "ist the emps 3hose first G chars from 0ire ate1last G characters of Salary7 115. "ist the emps /hose 49K of Salary is equal to year of !oinin+7 116. "ist first @9K of chars of Ename in "o3er #ase an remainin+ are upper #ase7 117. "ist the Dname 3hose No7 of Emps is 1to number of chars in the Dname7 118. "ist the emps those 3ho !oine in company before 4@ th of the month7 119. "ist the Dname; no of chars of 3hich is 1 no7 of emp.s in any other Dept7 120. "ist the emps 3ho are 3orAin+ as Mana+ers7 121. "ist $0E Name of ept 3here hi+hest no7of emps are 3orAin+7 122. #ount the No7of emps 3ho are 3orAin+ as -Mana+ers.(usin+ set option)7 123. "ist the emps 3ho !oine in the company on the same ate7 124. "ist the etails of the emps 3hose 2ra e is equal to one tenth of Sales Dept7 125. "ist the name of the ept 3here more than aJera+e no7of emps are 3orAin+7 126. "ist the Mana+ers name 3ho is haJin+ ma> no7of emps 3orAin+ un er him7 127. "ist the Ename an Sal is increa e by 4@K an e>presse as no7of Dollars7 128. Pro uce the output of EMP table -EMPFANDFJ'). for Ename an Job7 129. Pro uce the follo3in+ output from EMP7 EMPL !EE SM,$0 (clerA)

A""EN (Salesman) 130) "ist the mps 3ith 0ire ate in format June I; 45667 131) Print a list of emp.s "istin+ -!ust salary. if Salary is more than 4@99; on tar+et if Salary is 4@99 an -)elo3 4@99. if Salary is less than 4@997 132) /rite a query 3hich return the ay of the 3eeA for any ate entere in format -DD:MM:**.7 133) /rite a query to calculate the len+th of serJice of any employee 3ith the company; use DE%,NE to aJoi repetitiJe typin+ of functions7 134) 2iJe a strin+ of format -NN<NN.; Jerify that the first an last t3o characters are numbers an that the mi le character is.<.7 Print the e>pression -*ES. if Jali ; -N'. if not Jali 7 Hse the follo3in+ Jalues to test your solution7 -4G<=I.;.94<4a.; -55<56.7 135) Emps hire on or before 4@ th of any month are pai on the last %ri ay of that month those hire after 4@th are pai on the first %ri ay of the follo3in+ month7 Print a list of emps their hire ate an the first pay ate7 Sort on hire ate7 136) #ount the no7 of characters 3ith out consi erin+ spaces for each name7 137) %in out the emps 3ho are +ettin+ ecimal Jalue in their Sal 3ithout usin+ liAe operator7 138) "ist those emps 3hose Salary contains first four i+it of their Deptno7 139) "ist those Mana+ers 3ho are +ettin+ less than his emps Salary7 140) Print the etails of all the emps 3ho are sub:or inates to )laAe7 141) "ist the emps 3ho are 3orAin+ as Mana+ers usin+ co:relate sub:query7 142) "ist the emps 3hose M+r name is -Jones. an also 3ith his Mana+er name7 143) Define a Jariable representin+ the e>pression use to calculate on emps total annual remuneration use the Jariable in a statement; 3hich fin s all emps 3ho can earn =9999 a year or more7 144) %in out ho3 may Mana+ers are their in the company7 145) %in AJera+e salary an AJera+e total remuneration for each Job type7 &emember Salesman earn commission7 146) #hecA 3hether all the emps numbers are in ee unique7 147) "ist the emps 3ho are ra3in+ less than 4999 Sort the output by Salary7 148) "ist the employee Name; Job; Annual Salary; eptno; Dept name an +ra e

3ho earn =?999 a year or 3ho are not #"E&ES7 149) %in out the Job that 3as fille in the first half of 456= an same !ob that 3as fille urin+ the same perio of 456I7 150) %in out the emps 3ho !oine in the company before their Mana+ers7 151) "ist all the emps by name an number alon+ 3ith their Mana+er.s name an number7 Also "ist E,N2 3ho has no -Mana+er.7 152) %in all the emps 3ho earn the minimum Salary for each !ob 3ise in ascen in+ or er7 153) %in out all the emps 3ho earn hi+hest salary in each !ob type7 Sort in escen in+ salary or er7 154) %in out the most recently hire emps in each Dept or er by 0ire ate7 155) "ist the employee name;Salary an Deptno for each employee 3ho earns a salary +reater than the aJera+e for their epartment or er by Deptno7 156) "ist the Deptno 3here there are no emps7 157) "ist the No7of emp.s an AJ+ salary 3ithin each epartment for each !ob7 158) %in the ma>imum aJera+e salary ra3n for each !ob e>cept for -Presi ent.7 159) %in the name an Job of the emps 3ho earn Ma> salary an #ommission7 160) "ist the Name; Job an Salary of the emps 3ho are not belon+in+ to the epartment 49 byt 3ho haJe the same !ob an Salary as the emps of ept 497 161) "ist the Deptno; Name; Job; Salary an SalP#omm of the SA"ESMAN 3ho are earnin+ ma>imum salary an commission in escen in+ or er7 162) "ist the Deptno; Name; Job; Salary an SalP#omm of the emps 3ho earn the secon hi+hest earnin+s (sal P comm7)7 163) "ist the Deptno an their aJera+e salaries for ept 3ith the aJera+e salary less than the aJera+es for all epartments7 164) "ist out the Names an Salaries of the emps alon+ 3ith their mana+er names an salaries for those emps 3ho earn more salary than their Mana+er7 165) "ist out the Name; Job; Salary of the emps in the epartment 3ith the hi+hest aJera+e salary7 166) "ist the empno;sal;comm7 'f emps7 167) "ist the etails of the emps in the ascen in+ or er of the sal7

168) "ist the ept in the ascen in+ or er of the !ob an the esc or er of the emps print empno; ename7 169) Display the unique ept of the emps7 170) Display the unique ept 3ith !obs7 171) Display the etails of the blaAe7 172) "ist all the clerAs7 173) list all the employees !oine on 4st may 647 174) "ist the empno;ename;sal; eptno of the ept 49 emps in the ascen in+ or er of salary7 175) "ist the emps 3hose salaries are less than =@997 176) "ist the empno;ename;sal of all the emp !oine before 4 apr 647 177) "ist the emp 3hose annual sal is 8G@999 in the asc or er of the salaries7 178) "ist the empno;ename;annsal; ailysal of all the salesmen in the asc ann sal; 179) "ist the empno;ename;hire ate;current ate M e>p in the ascen in+ or er of the e>p7 180) "ist the emps 3hose e>p is more than 49 years7 181) "ist the empno;ename;sal;$A=9K;DA I9K;0&A @9K;2&'SS;",#;P%;net; e uction;net allo3 an net sal in the ascen in+ or er of the net salary7 182) "ist the emps 3ho are 3orAin+ as mana+ers7 183) "ist the emps 3ho are either clerAs or mana+ers7 184) "ist the emps 3ho haJe !oine on the follo3in+ ates 4 may 64;4B noJ 64;=9 ec 647 185) "ist the emps 3ho haJe !oine in the year 45647 186) "ist the emps 3hose annual sal ran+in+ from G=999 to I99997 187) "ist the emps 3orAin+ un er the m+rs B=?5;B659;B?@I;B5997

188) "ist the emps 3ho !oine in the secon half of 6G7 189) "ist all the Ichar emps7 190) "ist the emp names startin+ 3ith -M. 3ith @ chars7 191) "ist the emps en 3ith -0. all to+ether @ chars7 192) "ist names start 3ith -M.7 193) "ist the emps 3ho !oine in the year 647 194) "ist the emps 3hose sal is en in+ 3ith 997 195) "ist the emp 3ho !oine in the month of JAN7 196) /ho !oine in the month haJin+ char -a.7 197) /ho !oine in the month haJin+ secon char -a.; 198) "ist the emps 3hose salary is I i+it number7 199) "ist the emp 3ho !oine in 69.s7 200) "ist the emp 3ho are clerAs 3ho haJe e>p more than 6ys7 201) "ist the m+rs of ept 49 or G97 202) "ist the emps !oine in !an 3ith salary ran+in+ from 4@99 to I9997 203) "ist the unique !obs of ept G9 an =9 in esc or er7 204) "ist the emps alon+ 3ith e>p of those 3orAin+ un er the m+r 3hose number is startin+ 3ith B but shoul not haJe a 5 !oine before 456=7 205) "ist the emps 3ho are 3orAin+ as either m+r or analyst 3ith the salary ran+in+ from G999 to @999 an 3ith out comm7 206) "istthe empno;ename;sal;!ob of the emps 3itht ann sal 8=I999 but receiJin+ some comm7 /hich shoul not beDsal an es+ sh be sales man 3orAin+ for ept =97 207) "ist the emps 3ho are 3orAin+ for ept 49 or G9 3ith es3+s as clerA or analyst 3ith a sal is either = or I i+its 3ith an e>pD6ys but oes not belon+ to mons of mar;ap;sep an 3orAin+ for m+rs Mno is not en in+ 3ith 66 an @?7

208) "ist the empno;ename;sal;!ob; eptnoMe>p of all the emps belon+s to ept 49 or G9 3ith an e>p ? to 49 y 3orAin+ un er the some m+r 3ith out comm7 /ith a !ob not en in+ irrespectiJe of the position 3ith comm7DG99 3ith e>pD1By an sal8G@99 but not belon+s to to the month sep or noJ 3orAin+ un er the m+r 3hose no is not haJin+ i+its either 5 or 9 in the asc eptM esc ept7 209) "ist the etails of the emps 3orAin+ at #hica+o7 210) "ist the empno;ename; eptno;loc of all the emps7 211) "ist the empno;ename;loc; name of all the epts7;49 an G97 212) "ist the empno;ename;sal;loc of the emps 3orAin+ at #hica+o allas 3ith an e>pD?ys7 213) "ist the emps alon+ 3ith loc of those 3ho belon+s to allas ;ne3yorA 3ith sal ran+in+ from G999 to @999 !oine in 647 214) "ist the empno;ename;sal;+ra e of all emps7 215) "ist the +ra e G an = emp of #hica+o7 216) "ist the emps 3ith loc an +ra e of accountin+ #hica+o 3ith the +ra es = to @ Me>p D?y ept or the locs allas or

217) "ist the +ra es = emps of research an operations epts77 !oine after 456B an 3hose names shoul not be either miller or allen7 218) "ist the emps 3hose !ob is same as smith7 219) "ist the emps 3ho are senior to miller7 ller7 220) "ist the emps 3hose !ob is same as either allen or salDallen7 221) "ist the emps 3ho are senior to their o3n mana+er7 222) "ist the emps 3hose sal +reater than blaAes sal7 223) "ist the ept 49 emps 3hose salDallen sal7 224) "ist the m+rs 3ho are senior to Ain+ an 3ho are !unior to smith7 225) "ist the empno;ename;loc;sal; name;loc of the all the emps belon+in+ to Ain+ ept7

226) "ist the emps 3hose sal+ra e are +reater than the +ra e of miller7 227) "ist the emps 3ho are belon+in+ a amsor e>p more than smith7 allas or #hica+o 3ith the +ra e same as

228) "ist the emps 3hose sal is same as for or blaAe7 229) "ist the emps 3hose sal is same as any one of the follo3in+7 230) Sal of any clerA of emp4 table7 231) Any emp of empG !oine before 6G7 232) $he total remuneration (salPcomm7) of all sales person of Sales ept belon+in+ to emp= table7 233) Any 2ra e I emps Sal of emp I table7 234) Any emp Sal of emp@ table7 235) "ist the hi+hest pai emp7 236) "ist the etails of most recently hire emp of ept =97 237) "ist the hi+hest pai emp of #hica+o !oine before the most recently hire emp of +ra e G7 238) "ist the hi+hest pai emp 3orAin+ un er Ain+7

Das könnte Ihnen auch gefallen