SQL Queries

1)Display the details of all employees
a)select * from emp;
2)Display the depart informaction from department table
a)select * from dept;
3)Display the name and job for all the employees
a)select ename,job from emp;
4)Display the name and salary for all the employees
a)select ename,sal from emp;
5)Display the employee no and totalsalary for all the employees
a)select empno,sal+comm as total from emp grop by empno;
!)Display the employee name and annal salary for all employees"
a)select ename,sal * 12 as annalsalary from emp;
#)Display the names of all the employees $ho are $or%ing in depart
nmber 1&"
a)select emame from emp $here deptno'1&;
()Display the names of all the employees $ho are $or%ing as cler%s
and
dra$ing a salary more than 3&&&"
a)select ename from emp $here job')*+,-./) and sal03&&&;
1)Display the employee nmber and name $ho are earning comm"
a)select empno,ename from emp $here comm is not nll;
1&)Display the employee nmber and name $ho do not earn any
comm"
a)select empno,ename from emp $here comm is nll;
11)display the names of employees $ho are $or%ing as
cler%s,salesman or
analyst and dra$ing a salary more than 3&&&"
2)select ename from emp $here job')*+,-.) 3-
435')/2+,/627) 3-
435')272+8/9) 27D /2+03&&&;
12)display the names of the employees $ho are $or%ing in the
company
for the past 5 years;
a)select ename from emp $here
to:char;sysdate,)8888))<to:char;hiredate,)8888))0'5;
13)Display the list of employcees $ho ha=e joined the company
before
3&<4>7<1& or after 31<D,*<1&"
a)select ename from emp $here hiredate ? )3&<4>7<111&) or hiredate
0
)31<D,*<1&);
14)Display crrent Date"
a)select sysdate from dal;
15)Display the list of all sers in yor database;se catalog table)"
a)select sername from all:sers;
1!)Display the names of all tables from crrent ser;
a)select tname from tab;
1#)Display the name of the crrent ser"
a)sho$ ser
1()Display the names of employees $or%ing in depart nmber 1& or
2& or
4& or employees $or%ing as *+,-./, /2+,/627 or 272+8/9"
a) /elect ename from emp $here deptno in;1&,2&,4&) or job
in;)*+,-./),)/2+,/627),)272+8/9));
11) Display the names of employees $hose name starts $ith
alphabet /"
a)select ename from emp $here ename li%e )/@);
2&) Display the ,mployee names for employees $hose name ends
$ith 2lphabet /"
a) /elect ename from emp $here ename li%e )@/);
21) Display the names of employees $hose names ha=e second
alphabet 2 in their names"
a) /elect ename from ,6A $here ename li%e ):2@);
22) select the names of the employee $hose names is eBactly fi=e
*haracters in length"
a) select ename from emp $here length;ename)'5;
23) Display the names of the employee $ho are not $or%ing as
6272C,-/"
a) /elect ename from emp $here job not in ;)6272C,-));
24)Display the names of the employee $ho are not $or%ing as
/2+,/627 3- *+,-. 3- 272+8/9"
2)select ename from emp $here job not
in;)/2+,/627),)*+,-.),)272+8/9));
25) Display all ro$s from ,6A table" 9he system shold $ait after
e=ery /creen fll of information"
a) /et pase on
2!) Display the total nmber of employee $or%ing in the company"
a) /elect cont ;*) from ,6A;
2#) Display the total salary beiging paid to all employees"
a)select sm;sal) from emp;
2()Display the maBimm salary from emp table"
a)select maB;sal) from emp;
21)Display the minimm salary from emp table"
a)select min;sal) from emp;
3&)Display the a=erage salary from emp table"
a)select a=g;sal) from emp;
31)Display the maBimm salary being paid to *+,-."
a)select maB;sal) from emp $here job')*+,-.);
32)Display the maBimm salary being paid to depart nmber 2&"
a)select maB;sal) from emp $here deptno'2&;
33)Display the minimm salary being paid to any /2+,/627"
a)select min;sal) from emp $here job')/2+,/627);
34)Display the a=erage salary dra$n by 6272C,-/"
a)select a=g;sal) from emp $here job')6272C,-);
35)Display the total salary dra$n by 272+8/9 $or%ing in depart
nmber
4&"
a)select sm;sal) from emp $here job')272+8/9) and deptno'4&;
3!)Display the names of the employee in order of salary i"e the name
of
the employee earning lo$est salary shold salary appear first"
a)select ename from emp order by sal;
3#)Display the names of the employee in descending order of salary"
a)select ename from emp order by sal desc;
3()Display the names of the employee in order of employee name"
a)select ename from emp order by ename;
31)Display empno,ename,deptno,sal sort the otpt first base on
name
and $ithin name by deptno and $ith in deptno by sal"
a) select empno,ename,deptno,sal from emp
order by ename,deptno,sal
4&)Display the name of the employee along $ith their annal
salary;sal*
12)"9he name
of the employee earning highest annal salary shold apper first"
a)select ename,sal*12 from emp order by sal desc;
41)Display name,salary,hra,pf,da,total salary for each employee" 9he
otpt shold be in
the order of total salary,hra 15@ of salary,da 1&@ of salary,pf 5@
salary,total salary $ill be;salary+hra+da)<pf"
a)select ename,sal,salD1&&*15 as hra,salD1&&*5 as pf,salD1&&*1& as
da,sal+salD1&&*15+salD1&&*1&<salD1&&*5 as total from emp;
42)Display depart nmbers and total nmber of employees $or%ing in
each
department"
a)select deptno,cont;deptno)from emp grop by deptno;
43)Display the =arios jobs and total nmber of employees $ithin
each
job grop"
a)select job,cont;job)from emp grop by job;
44)Display the depart nmbers and total salary for each department"
a)select deptno,sm;sal) from emp grop by deptno;
45)Display the depart nmbers and maB salary for each department"
a)select deptno,maB;sal) from emp grop by deptno;
4!)Display the =arios jobs and total salary for each job
a)select job,sm;sal) from emp grop by job;
4#)Display the =arios jobs and total salary for each job
a)select job,min;sal) from emp grop by job;
4()Display the depart nmbers $ith more than three employees in
each
dept"
a)select deptno,cont;deptno) from emp grop by deptno ha=ing
cont;*)03;
41)Display the =arios jobs along $ith total salary for each of the
jobs $here total salary is greater than 4&&&&"
a)select job,sm;sal) from emp grop by job ha=ing sm;sal)04&&&&;
5&)Display the =arios jobs along $ith total nmber of employees in
each job"9he otpt shold contain only those jobs $ith more than
three
employees"
a)select job,cont;empno) from emp grop by job ha=ing
cont;job)03
51)Display the name of the empployee $ho earns highest salary"
a)select ename from emp $here sal';select maB;sal) from emp);
52)Display the employee nmber and name for employee $or%ing as
cler%
and earning highest salary among cler%s"
a)select empno,ename from emp $here $here job')*+,-.) and
sal';select
maB;sal) from emp $here job')*+,-.));
53)Display the names of salesman $ho earns a salary more than the
highest salary of any cler%"
a)select ename,sal from emp $here job')/2+,/627) and
sal0;select
maB;sal) from emp $here job')*+,-.));
54)Display the names of cler%s $ho earn a salary more than the
lo$est
salary of any salesman"
2)select ename from emp $here job')*+,-.) and sal0;select
min;sal) from
emp $here job')/2+,/627));
55)Display the names of employees $ho earn a salary more than that
of
4ones or that of salary grether than that of scott"
a)select ename,sal from emp $here sal0
;select sal from emp $here ename')437,/))and sal0 ;select sal from
emp
$here ename')/*399));
5!)Display the names of the employees $ho earn highest salary in
their
respecti=e departments"
a)select ename,sal,deptno from emp $here sal in;select maB;sal)
from
emp grop by deptno);
5#)Display the names of the employees $ho earn highest salaries in
their respecti=e job grops"
a)select ename,sal,job from emp $here sal in;select maB;sal) from
emp
grop by job)
5()Display the employee names $ho are $or%ing in acconting
department"
a)select ename from emp $here deptno';select deptno from dept
$here
dname')2**3>79E7C))
51)Display the employee names $ho are $or%ing in *hicago"
a)select ename from emp $here deptno';select deptno from dept
$here
+3*')*FE*2C3))
!&)Display the 4ob grops ha=ing total salary greater than the
maBimm
salary for managers"
a)/,+,*9 435,/>6;/2+) G-36 ,6A C-3>A 58 435 F2HE7C
/>6;/2+)0;/,+,*9
62I;/2+) G-36 ,6A JF,-, 435')6272C,-));
!1)Display the names of employees from department nmber 1& $ith
salary
grether than that of any employee $or%ing in other department"
a)select ename from emp $here deptno'1& and sal0any;select sal
from emp
$here deptno not in 1&)"
!2)Display the names of the employees from department nmber 1&
$ith
salary greater than that of all employee $or%ing in other departments"
a)select ename from emp $here deptno'1& and sal0all;select sal
from emp
$here deptno not in 1&)"
!3)Display the names of the employees in >ppercase"
a)select pper;ename)from emp
!4)Display the names of the employees in +o$ecase"
a)select lo$er;ename)from emp
!5)Display the names of the employees in Aropercase"
a)select initcap;ename)from emp;
!!)Display the length of 8or name sing appropriate fnction"
a)select length;)name)) from dal
!#)Display the length of all the employee names"
a)select length;ename) from emp;
!()select name of the employee concatenate $ith employee nmber"
select enameKKempno from emp;
!1)>ser approprate fnction and eBtract 3 characters starting from 2
characters from the follo$ing string )3racle)" i"e the ot pt shold be
)ac)"
a)select sbstr;)oracle),3,2) from dal
#&)Gind the Girst occrance of character )a) from the follo$ing string
i"e )*ompter 6aintenance *orporation)"
a)/,+,*9 E7/9-;)*ompter 6aintenance *orporation),)a),1) G-36
D>2+
#1)-eplace e=ery occrance of alphabhet 2 $ith 5 in the string
2llens;se translate fnction)
a)select translate;)2llens),)2),)5)) from dal
#2)Display the informaction from emp table"Jhere job manager is
fond
it shold be displayed as boos;>se replace fnction)"
a)select replace;435,)6272C,-),)53//)) G-36 ,6A;
#3)Display empno,ename,deptno from emp table"Enstead of display
department nmbers display the related department name;>se
decode fnction)"
a)select
empno,ename,decode;deptno,1&,)2**3>79E7C),2&,)-,/,2-*F),3
&,)/2+,/),4&,)3A-29E37/)) from emp;
#4)Display yor age in days"
a)select to:date;sysdate)<to:date;)1&<sep<##))from dal
#5)Display yor age in months"
a)select months:bet$een;sysdate,)1&<sep<##)) from dal
#!)Display the crrent date as 15th 2gest Griday 7ineteen 7inety
/a=en"
a)select to:char;sysdate,)ddth 6onth day year)) from dal
##)Display the follo$ing otpt for each ro$ from emp table"
#()scott has joined the company on $ednesday 13th 2gst ninten
nintey"
a)select ,726,KK) F2/ 43E7,D 9F, *36A278 37 )KK
to:char;FE-,D29,,)day
ddth 6onth year)) from ,6A;
#1)Gind the date for nearest satrday after crrent date"
a)/,+,*9 7,I9:D28;/8/D29,,)/29>-D28))G-36 D>2+;
(&)display crrent time"
a)select to:char;sysdate,)hhL66Lss)) from dal"
(1)Display the date three months 5efore the crrent date"
a)select add:months;sysdate,3) from dal;
(2)Display the common jobs from department nmber 1& and 2&"
a)select job from emp $here deptno'1& and job in;select job from
emp
$here deptno'2&);
(3)Display the jobs fond in department 1& and 2& ,liminate
dplicate
jobs"
a)select distinct;job) from emp $here deptno'1& or deptno'2&
or
select distinct;job) from emp $here deptno in;1&,2&);
(4)Display the jobs $hich are niMe to department 1&"
a)select distinct;job) from emp $here deptno'1&
(5)Display the details of those $ho do not ha=e any person $or%ing
nder them"
a)select e"ename from emp,emp e $here emp"mgr'e"empno grop
by e"ename
ha=ing cont;*)'1;
(!)Display the details of those employees $ho are in sales
department
and grade is 3"
a) select * from emp $here deptno';select deptno from
dept $here
dname')/2+,/))and
sal bet$een;select losal from salgrade $here
grade'3)and
;select hisal from salgrade $here grade'3);
(#)Display those $ho are not managers and $ho are managers any
one"
i)display the managers names
a)select distinct;m"ename) from emp e,emp m $here
m"empno'e"mgr;
ii)display the $ho are not managers
a)select ename from emp $here ename not in;select
distinct;m"ename)
from emp e,emp m $here m"empno'e"mgr);
(()Display those employee $hose name contains not less than 4
characters"
a)select ename from emp $here length;ename)04;
(1)Display those department $hose name start $ith N/N $hile the
location name ends $ith N.N"
a)select dname from dept $here dname li%e )/@) and loc li%e )@.);
1&)Display those employees $hose manager name is 437,/"
a)select p"ename from emp e,emp p $here e"empno'p"mgr and
e"ename')437,/);
11)Display those employees $hose salary is more than 3&&& after
gi=ing
2&@ increment"
a)select ename,sal from emp $here ;sal+sal*"2)03&&&;
12)Display all employees $hile their dept names;
s)select ename,dname from emp,dept $here
emp"deptno'dept"deptno
13)Display ename $ho are $or%ing in sales dept"
a)select ename from emp $here deptno';select deptno from dept
$here
dname')/2+,/));
14)Display employee name,deptname,salary and comm for those sal
in
bet$een 2&&& to 5&&& $hile location is chicago"
a)select ename,dname,sal,comm from emp,dept $here sal bet$een
2&&& and
5&&& and loc')*FE*2C3) and emp"deptno'dept"deptno;
15)Display those employees $hose salary greter than his manager
salary"
a)select p"ename from emp e,emp p $here e"empno'p"mgr and
p"sal0e"sal
1!)Display those employees $ho are $or%ing in the same dept $here
his
manager is $or%"
a)select p"ename from emp e,emp p $here e"empno'p"mgr and
p"deptno'e"deptno;
1#)Display those employees $ho are not $or%ing nder any
manager"
a)select ename from emp $here mgr is nll
1()Display grade and employees name for the dept no 1& or 3& bt
grade
is not 4 $hile joined the company before 31<dec<(2"
a)select ename,grade from emp,salgrade $here sal bet$een losal
and hisal and deptno in;1&,3&) and grade?04 and hiredate?)31<D,*<
(2);
11)>pdate the salary of each employee by 1&@ increment $ho are
not eligibl$ for commission"
a)pdate emp set sal'sal+sal*1&D1&& $here comm is nll;
1&&)/,+,*9 those employee $ho joined the company before 31<
dec<(2 $hile their dept location is ne$yor% or *hicago"
a)/,+,*9 ,6A73,,726,,FE-,D29,,D726,,+3* G-36
,6A,D,A9 JF,-,
;,6A"D,A973'D,A9"D,A973)27D
FE-,D29, ?)31<D,*<(2) 27D D,A9"+3* E7;)*FE*2C3),)7,J
83-.));

1&1)DE/A+28 ,6A+38,, 726,,435,D,A2-96,79,+3*29E37
G3- 2++ JF3 2-,
J3-.E7C 2/ 6272C,-O
2)select ename,435,D726,,+3*29E37 from emp,D,A9 $here mgr
is not nll;
1&2)dE/A+28 9F3/, ,6A+38,,/ JF3/, 6272C,- 726, E/
437,/O <<P27D 2+/3
DE/A+28 9F,E- 6272C,- 726,QO
2) /,+,*9 A",726, G-36 ,6A ,, ,6A A JF,-,
,",6A73'A"6C- 27D
,",726,')437,/);
1&3)Display name and salary of ford if his salary is eMal to hisal of
his grade
a)select ename,sal,grade from emp,salgrade $here sal bet$een losal
and
hisal
and ename ')G3-D) 27D FE/2+'/2+;
1&4)Display employee name,job,depart name ,manager name,his
grade and
ma%e ot an nder department $iseO
a)/,+,*9 ,",726,,,"435,D726,,,6A",726,,C-2D, G-36
,6A,,6A
,,/2+C-2D,,D,A9
JF,-, ,6A"/2+ 5,9J,,7 +3/2+ 27D FE/2+ 27D
,6A",6A73',"6C- 27D
,6A"D,A973'D,A9"D,A973 3-D,- 58 D726,
1&5)+ist ot all employees name,job,salary,grade and depart name
for e=ery one in the company eBcept )*+,-.)"/ort on salary display
the highest salaryO
a)/,+,*9 ,726,,435,D726,,/2+,C-2D, G-36
,6A,/2+C-2D,,D,A9 JF,-,
/2+ 5,9J,,7 +3/2+ 27D FE/2+ 27D
,6A"D,A973'D,A9"D,A973 27D 435 739
E7;)*+,-.))3-D,- 58 /2+ 2/*;
1&!)Display the employee name,job and his manager"Display also
employee $ho are $ithot managerO
a)select e"ename,e"job,e6A"ename 2/ 6anager from emp,emp e
$here emp"empno;+)'e"mgr
1&#)Gind ot the top 5 earners of companyO
a)/,+,*9 DE/9E7*9 /2+ G-36 ,6A , JF,-, 50';/,+,*9
*3>79;DE/9E7*9 /2+)
G-36 ,6A 2 JF,-, 2"/2+0',"/2+)3-D,- 58 /2+ D,/*;
1&()Display name of those employee $ho are getting the highest
salaryO
a)select ename from emp $here sal';select maB;sal) from emp);
1&1)Display those employee $hose salary is eMal to a=erage of
maBimm
and minimmO
a)select ename from emp $here sal';select maB;sal)+min;sal)D2 from
emp);
11&)/elect cont of employee in each department $here cont
greater than 3O
a)select cont;*) from emp grop by deptno ha=ing cont;deptno)03
111)Display dname $here at least 3 are $or%ing and display only
department nameO
a)select distinct d"dname from dept d,emp e $here
d"deptno'e"deptno and
30any ;select cont;deptno) from emp grop by deptno)
112)Display name of those managers name $hose salary is more
than a=erage salary of his companyO
a)/,+,*9 ,",726,,,6A",726, G-36 ,6A,,6A , JF,-,
,6A",6A73',"6C- 27D
,"/2+0;/,+,*9 2HC;/2+) G-36 ,6A);
113)Display those managers name $hose salary is more than
a=erage salary of his employeeO
a)/,+,*9 DE/9E7*9 ,6A",726, G-36 ,6A,,6A , JF,-,
,"/2+ ?;/,+,*9 2HC;,6A"/2+) G-36 ,6A
JF,-, ,6A",6A73',"6C- C-3>A 58 ,6A",726,) 27D
,6A",6A73',"6C-;
114)Display employee name,sal,comm and net pay for those
employee $hose net pay is greter than or eMal to any other
employee salary of
the companyO
a)select ename,sal,comm,sal+n=l;comm,&) as 7etAay from emp
$here sal+n=l;comm,&) 0any ;select sal from emp)
115)Display those employees $hose salary is less than his manager
bt more than salary of any other managerO
a)
11!)Display all employees names $ith total sal of company $ith each
employee nameO
a)/,+,*9 ,726,,;/,+,*9 />6;/2+) G-36 ,6A) G-36 ,6A;
11#)Gind ot last 5;least)earners of the company"O
a)/,+,*9 DE/9E7*9 /2+ G-36 ,6A , JF,-, 50';/,+,*9
*3>79;DE/9E7*9 /2+)
G-36 ,6A 2 JF,-, 2"/2+?',"/2+)3-D,- 58 /2+ D,/*;
11()Gind ot the nmber of employees $hose salary is greater than
their manager salaryO
a)/,+,*9 ,",726, G-36 ,6A ,,6A , JF,-,
,6A",6A73',"6C- 27D
,6A"/2+?,"/2+;
111)Display those manager $ho are not $or%ing nder president bt
they are $or%ing nder any other managerO
a)
12&)Display those department $here no employee $or%ingO
a)select dname from emp,dept $here emp"deptno not in;emp"deptno)
121)delete those records from emp table $hose deptno not a=ailable
in dept table"
a)
122)Display those enames $hose salary is ot of the grade a=ailable
in salgrade table"
a)
123)Display employee name,sal,comm and $hose net pay is greater
than
any other in the companyO
a)
124)Display name of those employee $ho are going to retrie 31<
D,*<11"
if the maBimm job period is 3& yearsO
a)
125)Display those employee $hose salary is 3DD =aleO
a)select * from emp $here sal?&;
12!)Display those employee $hose salary contains alleast 3 digitsO
a)select * from emp $here length;sal)0'3;
12#)Display those employee $ho joined in the company in the month
of
DecO
a)select ename from emp $here to:char;hiredate,)637))')D,*);
12()Display those employees $hose name contains N2NO
a)select ename from emp $here instr;ename,)2))0&;
or
select ename from emp $here ename li%e;)@2@));
121)Display those employee $hose deptno is a=ailable in salaryO
a)select emp"ename from emp, emp e $here emp"sal'e"deptno;
13&)Display those employee $hose first 2 characters from hiredate
<last
2 characters of salaryO
a)select ename,/>5/9-;hiredate,1,2)KK,726,KKsbstr;sal,<2,2) from
emp
131)Display those employee $hose 1&@ of salary is eMal to the year
of
joiningO
a)select ename from emp $here to:char;hiredate,)88))'sal*&"1;
132)Display those employee $ho are $or%ing in sales or researchO
a)/,+,*9 ,726, G-36 ,6A JF,-, D,A973 E7;/,+,*9
D,A973 G-36 D,A9 JF,-,
D726, E7;)/2+,/),)-,/,2-*F)));
133)Display the grade of jonesO
a)/,+,*9 ,726,,C-2D, G-36 ,6A,/2+C-2D, JF,-, /2+
5,9J,,7 +3/2+ 27D
FE/2+ 27D ,name')437,/);
134)Display those employees $ho joined the company before 15 of
the
monthO
a)select ename from emp $here to:char;hiredate,)DD))?15;
135)Display those employee $ho has joined before 15th of the
month"
a)select ename from emp $here to:char;hiredate,)DD))?15;
13!)Delete those records $here no of employees in a particlar
department is less than 3"
a)delete from emp $here deptno';select deptno from emp
grop by deptno ha=ing cont;deptno)?3);
13#)Display the department name the no of characters of $hich
is eMal to no of employee in any other department"
a)
13()Display the name of the department $here no employee $or%ing"
a)
131)Display those employees $ho are $or%ing as manager"
a)
14&)*ont the no of employees $ho are $or%ing as manager;sing
set
operations)"
a)
141)Display the name of the dept those employee $ho joined the
company
on the same dateO
a)
142)Display those employees $hose grade is eMal to any nmber of
sal
bt not eMal to first nmber of salO
a)
143)*ont the no of empployee $or%ing as manager sing set
operactionO
a)
144)display the name of the employees $ho joined the same date"
a)
145)Display the manager $ho is ha=ing maBimm nmber of
employees $or%ing nder himO
a)
14!)list ot employee name and salary increased by 15@ and
eBpressed as $hole nmber of DollarsO
a)
14#)Arodce the otpt of the emp table N,6A+38,, 27D 435N for
ename and jobO
a)
14()+ist all employee $ith hiredate in the format )jne 4 11(()O
a)
141)Arint lost of employees displaying Njst salaryN if more than 15&&
if eBactly 15&& display )3n target) if less than 15&& Display belo$
15&&O
2)select ename,sal,;case $hen sal015&& then )5elo$:target) $hen
sal'15&& then )3n:targer) $hen sal?15&& then
)less than target) else )%%%%%) end )from emp
15&)JFE*F Mery to calcate the length of time any employee has
been $ith the companyO

151)Ci=e a string of the format )nnDnn) Herify that the first and last
2 characters are nmbers"2nd that the middle character is )D) Arint the
eBprection )8es) if =alid )7o) of not =alid >se the follo$ing =ales to
test yor solction )R12D54;7ot clear)"
a)
152),mployee hire on 15th of any month are paid on the last Griday
of that month" 9hose hired after 15th are paid the last Griday of the
follo$ing month"Arint a list of employees"their hire date and first pay
date scort those $hose salary contains first digits of their deptnoO
a)
select ename,hiredate,last:day;neBt:day;hiredate,)G-ED28))),deptno,
;
case $hen to:char;hiredate,)DD))?'15 then
last:day;neBt:day;hiredate,)G-ED28)))
$hen to:char;hiredate,)DD))015 then
last:day;neBt:day;add:months;hiredate,1),)G-ED28)))
end
)from emp order by sbstr;sal,&,2) ;
153)Display those manager $ho are getting less than his employee
salaryO
a)
154)Arint the details of all the employees $ho are /b<ordinate to
5+2.,O
a)select emp"ename from emp, emp e $here emp"mgr'e"empno and
e"ename')5+2.,);
155)Display those $ho are $or%ing as manager sing *3<relate sb<
MeryO
a)
15!)Display those employee $hose manager name is jones and also
$ith his manager nameO
a)
15#)Define =ariable representing the eBpression sed to calclate on
employee total 2nnal -emnatationO
a)
15()>se the =ariable in a statement $hich finds all employees $ho
can earn R3&,&&& a year or moreO
a)
151)Gind ot ho$ many managers are there $ith ot listing themO
a)
1!&)Gind ot the a=erage salary and a=erage total remneration for
each job type remember sales man earn commissionO
a)
1!1)*hec% $hether all employees nmber are indeed niMeO
a)
1!2)+ist ot the lo$est paid employees $or%ing for each manager
eBclde any grops $here minimm salary is less than -s"1&&& /ort
the otpt by salaryO
a)
1!3)+ist ename,job,annal sal,deptno,dname and grade $ho earn
R3!,&&& a year or $ho are not *ler%sO
a)
1!4)Gind ot the job that $as failedin the first half of 11(3 and same
job that $as failed dring the same period on 11(4O
a)
1!5)Gind ot the employees $ho joined the company before their
managerO
a)
1!!)+ist ot all the employees by name and nmber along $ith their
manager)s name and nmber also display @7C $ho has no
managerO
a)
1!#)Gind ot the employee $ho earned the highest salary in each job
type /ort in desending salary orderO
a)
1!()Gind ot the employees $ho earned the minimm salary for their
job in 2ssending orderO
a)
1!1)Gind ot the most resently hired employees in each department
3rder by hiredateO
a)
1#&)Display ename,salary and deptno for each employee $ho earn a
salary greater than the a=erage for then department order by
deptnoO
a)
1#1)Display the department $here there are no employeesO
a)
1#2)Display the department no $ith highest annal remnaration bill
as compensationO
a)
1#3)En $hich year did most people join the company Display the year
and nmber of employeesO
a)
1#4)Display the a=erage salary figre for the departmentO
a)select a=g;/2+) from emp grop by deptno
1#5)Jrite a Mery of display against the ro$ of the most recently
hired employees Display ename Firedate and colmn maB date
sho$ing;
a)
1#!)Display employee $ho can earn more than lo$est salary in
department no 3&O
a)
1##)Gind employees $ho can earn more than e=ery employee in
deptnoO
a)
1#()/elect dept name deptno and sm of salaryO
a)
1#1)Gind ot a=erage salary and a=erage total remainders for each
job typeO
a)
1(&)Gind all departments $hich ha=e more than 3 employeesO
a)
1(1)*hec% $hether employees nmber are niMeO
a)
1(2)+ist lo$est paid employees $or%ing for each manager eBclde
any
grops $here the minimm salary less than 1&&&" /ort the otpt by
salaryO
a)
1(3)Ef the pay day is neBt friday after 15th and 3&th of e=ery
month"$hat is the neBt pay day from their hire date for employee in
emp tableO
a)
1(4)Ef an employee is ta%en by yo today in yor organisation"
2nd it is a policy in yor company to ha=e a re=ie$ after 1 months the
joined date ;and of 1st of neBt month after 1 months )ho$ many days
from today yor employees has 9o $ait for a re=ie$O
a)
1(5)Display employee name and his salary $hose salary is greater
than highest a=erage of department nmberO
a)/,+,*9 /2+ G-36 ,6A JF,-, /2+0;/,+,*9
62I;2HC;/2+)) G-36 ,6A C-3>A 58
D,A973);
1(!)Display the 1&th record of emp table;$ithot sing ro$id)
a) /,+,*9 * G-36 ,6A JF,-, -3J7>6?11
6E7>/
/,+,*9 * G-36 ,6A JF,-, -3J7>6?1&
1(#)Display the half of the ename)s in pper case and remaining
lo$ercaseO
a) /,+,*9
/>5/9-;+3J,-;,726,),1,3)KK
/>5/9-;>AA,-;,726,),3,+,7C9F;,726,)) G-36 ,6A;
1((" Display the 1&th record of emp table $ithot sing grop
by and ro$idO
2) /,+,*9 * G-36 ,6A JF,-, -3J7>6?11
6E7>/
/,+,*9 * G-36 ,6A JF,-, -3J7>6?1&
1(1" Delete the 1&th record of emp table"
2) D,+,9, G-36 ,6A JF,-, ,6A73';/,+,*9
,6A73 G-36 ,6A JF,-, -3J7>6?11
6E7>/
/,+,*9 ,6A73 G-36 ,6A JF,-, -3J7>6?1&)
11&" *reate a copy of emp table;
a) create table ne$:table as select * from emp $here 1'2;
111" /elect ename if ename eBists more than once"
a) select ename from emp e grop by ename ha=ing
cont;*)01;
112" Display all enames in re=erse orderO;/6E9FLF9E6/)"
a) /,+,*9 -,H,-/,;,726,)G-36 ,6A;
113" Display those employee $hose joining of month and
grade is eMal"
2) /,+,*9 ,726, G-36 ,6A JF,-, /2+
5,9J,,7;/,+,*9 +3/2+ G-36 /2+C-2D,
JF,-, C-2D,'93:*F2-;FE-,D29,,)66))) 27D
;/,+,*9 FE/2+ G-36 /2+C-2D, JF,-,
C-2D,'93:*F2-;FE-,D29,,)66)));
114" Display those employee $hose joining D29, is a=ailable
in deptno"
2) /,+,*9 ,726, G-36 ,6A JF,-,
93:*F2-;FE-,D29,,)DD))'D,A973
115" Display those employees name as follo$s
2 2++,7
5 5+2.,
2) /,+,*9 />5/9-;,726,,1,1),,726, G-36 ,6A;
11!" +ist ot the employees ename,sal,AG;2&@ 3G /2+) from
emp;
2) /,+,*9 ,726,,/2+,/2+*"2 2/ AG G-36 ,6A;
11#" Display -/A/ from emp $ithot sing pdating
inserting"
2)
11(" *reate table emp $ith only one colmn empno;
2) create table emp as select empno from emp $here 1'2;
111" 2dd this colmn to emp table ename =rachar2;2&)"
a) alter table emp add;ename =archar2;2&));
2&&" 3ops E forgot gi=e the primary %ey constraint" 2dd in
no$"
a) alter table emp add primary %ey;empno);
2&1" 7o$ increase the length of ename colmn to 3&
characters"
a) alter table emp modify;ename =archar2;3&));
2&2" 2dd salary colmn to emp table"
alter table emp add;sal nmber;1&));
2&3" E $ant to gi=e a =alidation saying that salary cannot be
greater
1&,&&&;note gi=e a name to this constraint)
a) alter table emp add constraint ch%:&&1
chec%;sal?'1&&&&)
2&4" Gor the time being E ha=e decided that E $ill not impose
this
=alidation"
6y boss has agreed to pay more than 1&,&&&"
a) again alter the table or drop constraint $ith
alter table emp drop constraint ch%:&&1
;or)Disable the constraint by
sing
alter table emp modify constraint ch%:&&1
disable;
2&5" 6y boss has changed his mind" 7o$ he doesn)t $ant to
pay more
than 1&,&&&"
so re=o%e that salary constraint"
a) alter table emp modify constraint ch%:&&1 enable;
2&!" 2dd colmn called as mgr to yor emp table;
a) alter table emp add;mgr nmber;5));
2&#" 3hS 9his colmn shold be related to empno" Ci=e a
command to add
this constraint"
2) 2+9,- 925+, ,6A 2DD *37/9-2E79 6C-:D,A9
G3-,EC7 .,8;6C-) -,G,-,7*,/
,6A;,6A73)
2&(" 2dd deptno colmn to yor emp table;
a) alter table emp add;deptno nmber;5));
2&1" 9his deptno colmn shold be related to deptno colmn
of dept
table;
a) alter table emp add constraint dept:&&1 foreign
%ey;deptno)
reference dept;deptno)
Pdeptno shold be primary %eyQ
21&" Ci=e the command to add the constraint"
2) alter table ?table:name) add constraint
?constraint:name0
?constraint type0
211" *reate table called as ne$emp" >sing single command
create this
table as $ell as get data into this table;se create table as);
a) create table ne$emp as select * from emp;
212" *reate table called as ne$emp" 9his table shold
contain only
empno,ename,dname"
a) create table ne$emp as select empno,ename,dname
from emp,dept $here
1'2;
213" Delete the ro$s of employees $ho are $or%ing in the
company for
more than 2 years"
a) delete from emp $here ;sysdate<hiredate)D3!502;
214" Aro=ide a commission;1&@ *omm 3f /al) to employees
$ho are not
earning any commission"
a) select sal*&"1 from emp $here comm is nll
215" Ef any employee has commission his commission shold
be
incremented by 1&@ of his salary"
a) pdate emp set comm'sal*"1 $here comm is not nll;
21!" Display employee name and department name for each
employee"
a) select empno,dname from emp,dept $here
emp"deptno'dept"deptno
21#" Display employee nmber,name and location of the
department in $hich he is $or%ing"
a) select empno,ename,loc,dname from emp,dept $here
emp"deptno'dept"deptno;
21(" Display ename,dname e=en if there are no employees
$or%ing in a particlar department;se oter join)"
a) select ename,dname from emp,dept $here
emp"deptno'dept"deptno;+)
211" Display employee name and his manager name"
a) select p"ename,e"ename from emp e,emp p $here
e"empno'p"mgr;
22&" Display the department name and total nmber of
employees in each
department"
a) select dname,cont;ename) from emp,dept $here
emp"deptno'dept"deptno
grop by dname;
221" Display the department name along $ith total salary in
each
department"
a) select dname,sm;sal) from emp,dept $here
emp"deptno'dept"deptno
grop by dname;
222" Display itemname and total sales amont for each item"
a) select itemname,sm;amont) from item grop by
itemname;
223" Ci=e the follo$ing commandsL
Delete from emp $here job )cler%)
Enset into emp
$ithot gi=ing any frther commands mo=e to another client
system and log into the same ser gi=e the follo$ing command
select * from emp"
1"2re the abo=e changes reflected in this serO;yes)
2"Coto yor first system, and gi=e commit" *ome bac% to
second
system and gi=e the follo$ing command
/elect * from emp"
2nsL*hanges Jill be affect in second system"
T)Jrite a Tery 9o Delete 9he -epeted -o$s from emp table;
a)delete from emp $here ro$id not in;select min;ro$id)from emp
grop by
ename)
D
Plain Text Attachment P Do$nload Gile K /a=e to my 8ahooS
5riefcase Q
T>,-E,/ 52/,D 37 A-3C-266,-, /3G9J2-, U /9>DE,/
925+,/
::::::::::::::::::::::::::::::::::::::::::::::::::::::
1)Display the nmber of pac%ages de=eloped in each"
a)select cont;title) from soft$are grop by de=:in;
2)Display the nmber of pac%ages de=eloped by each person"
a)select cont;title) from soft$are grop by pname;
3)Display the nmber of male and female programmers"
a)select seB,cont;seB) from programer grop by seB;
4)Display the costiest pac%age and the highest selling pac%age
de=eloped in each langage"
a)select de=:in,maB;dcost),maB;sold) from soft$are grop by de=:in;
5)Display the nmber of people born in each year"
a)select to:char;dob,)88)),cont;dob) from programer grop by
to:char;dob,)88));
!)Display the nmber of people joined in each month"
a)select to:char;dob,)66)),cont;dob) from programer grop by
to:char;dob,)66));
#)Display the langage<$ise cont of prof1"
a)select prof1,cont;prof1) from programer grop by prof1;
()Display the nmber of people in each salary grop"
a)select salary,cont;salary) from programer grop by salary;
1)Display the nmeber of people in each institte"
a)select cont;inst) from stdies grop by inst;
1&)Display the nmber of people $ho stdied in each grop"
a)select cont;corse) from stdies grop by corse;
11)Display the 9otal de=elopment cost of the pac%ages de=eloped in
each
langage"
a)select de=:in,sm;dcost) from soft$are grop by de=:in;
12)Display the total selling cost of the pac%ages de=eloped in each
langage"
a)
13)Display the cost of pac%age de=eloped by each programmer"
a)select pname,scost+dcost from soft$are;
14)Display the sales =ale of the pac%ages de=eloped by each
programmer"
a)
15)Display the nmber of pac%ages sold by each programmer"
a)select cont;pname) from soft$are grop by pname;
1!)Display the sales cost of the pac%ages de=eloped by each
programmer
langage$ise"
a)
1#)Display the langage name $ith a=erage de=elopment cost and
selling
cost"
a)
1()Display the name of each programmer $ith the costiest pac%age
cheapest pac%age
de=eloped by himDher"
a)
11)Display each institte name $ith nmber of corses and a=erage
cost
per corse"
a)select inst,cont;corse),a=g;ccost) from stdies grop by inst;
2&)Display each institte name $ith nmber of stdents"
a)select inst,cont;inst)from stdies grop by inst;
21)Display the names of male programmers"
a)select pname from programer $here seB')6);
22)Display the programmers name and pac%ages de=eloped by
himDher"
a)select pname,title from soft$are;
23)Display the nmber of pac%ages in each langage, eBcept c U c+
+"
a)select cont;title) from soft$are $here de=:in not in;)*),)*pp))
grop by de=:in;
24)Display the nmber of pac%ages in each langage for $hich
de=elopment cost is greater than
1&&&"
a)select cont;title) from soft$are $here dcost01&&& grop by
de=:in;
25)Display the a=erage difference bet$een /cost and Dcost for each
lnagage"
a)select a=g;scost<dcost) from soft$are;
2!)Display highest,lo$est and a=erage salaries for those earning
more
than 2&&&"
a)select maB;salary),min;salary),a=g;salary) from programer $here
salary02&&&;
2#)Display the total scost,dcost and amont to be reco=ered for each
programmer
by those $hose dcost has not yet been reco=ered"
a)
2()Jho is the highest paid c programmer"
a)select pname,salary from programer $here salary';select
maB;salary)
from programer $here prof1')*) or prof2')*));
21)Jho is the highest paid female cobol programmer"
a)select pname,salary from programer $here salary';select
maB;salary)
from
programer $here seB')G) and prof1')*obol) or prof2')*obol));
3&)Display the names of the highest paid programmer for each
langage
prof1"
a)select pname from programer $here salary in;select maB;salary)
from
programer grop by prof1)
31)Jho is the least eBperienced programmer"
a)select min;doj)from programer;
32)Jho is the most eBperienced programmer in A2/*2+"
a)select maB;doj)from programer $here prof1')Aascal) or
prof2')Aascal);
33)Jhich langage is %no$n by only one programmer"
a)
34)Jho is the yongest programmer %no$ing dbase"
a)select pname from programer $here dob';select maB;dob) from
programer
$here prof1')Dbase) or prof2')Dbase));
35)Jhich female programmer earining more than 3&&& does not
%no$ c,c++,oracle or dbase"
a)select pname from programer $here seB')G) and salary03&&& and
prof1 not in;)*),)*pp),)3racle),)Dbase)) and prof2 not
in;)*),)*pp),)3racle),)Dbase)) ;
3!)Gind ot the a=erage selling cost for pac%ages de=eloped in
pascal"
a)select a=g;scost * sold) from soft$are $here de=:in')Aascal);
3#)Display the names and ages of all the programmers"
a)select pname,;sysdate<dob)D3!5 as age from programer"
3()Display the names of those $ho ha=e done the D2A corse"
a)select pname from stdies $here corse')D2A);
31)Display the name and date of birth of all programmers born in
janary"
a)select pname,dob from programer $here
to:char;dob,)637))')427);
4&)Display the lo$est corse fee"
a)/,+,*9 6E7;**3/9) G-36 /9>DE,/;
41)Fo$ many programmer ha=e done the ACD*2 corse"
a)/,+,*9 *3>79;*3>-/,) G-36 /9>DE,/ JF,-,
*3>-/,')ACD*2);
42)Fo$ mch re=ene has been earned throgh the sale of
pac%ages
de=eloped"
a)/,+,*9 />6;/3+D*/*3/9) G-36 /3G9J2-,;
43)Display the details of the soft$are de=eloped by -26,/F"
a)/,+,*9 * G-36 /3G9J2-, JF,-, A726,')-26,/F);
44)Fo$ many programmers stdied at /25F2-E"
a)/,+,*9 *3>79;*3>-/,) G-36 /9>DE,/ JF,-,
E7/9')/25F2-E);
45)Display the details oG pac%ages $hose sales crossed the 2&&&
mar%"
a)/,+,*9 * G-36 /3G9J2-, JF,-, /3+D02&&&;
4!)Gind ot the nmber of copies, $hich shold be sold in order to
reco=ered the
de=elopment cost of each pac%ages"
a)
4#)Display the details of pac%ages for $hich de=elopment cost has
been reco=ered"
a)
4()Jhat is the price of the costiest soft$are de=eloped in 5asic"
a)/,+,*9 /*3/9 G-36 /3G9J2-, JF,-, /*3/9';/,+,*9
62I;/*3/9) G-36
/9>DE,/ JF,-, D,H:E7')52/E*));
41)Fo$ many pac%ages are de=eloped in Dbase"
a)/,+,*9 *3>79;9E9+,) G-36 /9>DE,/ JF,-,
D,H:E7')D52/,);
5&)Jhat is the a=erage corsefee"
a)/,+,*9 2HC;**3/9) G-36 /9>DE,/;
51)Display the details of programmers %no$ing c"
a)/,+,*9 * G-36 A-3C-26,- JF,-, A-3G1')*) or prof2')*);
52)Fo$ many programmers %no$ either cobol or pascal"
a)/,+,*9 cont;pname) G-36 A-3C-26,- JF,-,
A-3G1')*obol) or prof2')Aascals);
53)Fo$ many programmers do not %no$ pascal U c"
a)/,+,*9 cont;pname) G-36 A-3C-26,- JF,-, A-3G1 not
in;)*),)Aascal))and prof2 not in;)*),)Aascal))
54)Fo$ old is the oldest male programmer"
a)select maB;sysdate<dob)D3!5 from programer $here seB')6);
55)Jhat is the a=erage age of female programmers"
a)select a=g;sysdate<dob)D3!5 from programer $here seB')G)
5!)*alclate the eBperience in years for each programmer and
siplay
along $ith the names in descending order"
a)select pname,;sysdate<doj)D3!5 from programer order by pname
desc;
5#)Jho are the programmers $ho celebrate their birthdays dring
the crrent month"
a)select pname from programer $here
to:char;dob,)mm))'to:char;sysdate,)mm));
5()Fo$ many female programmers are there"
a)select cont;*) from programer $here seB')G);
51)Jhat are the langage %no$n by the male programmers"
a)select prof1,prof2 from programer $here seB')6);
!&)Jhat is the a=erage salary"
a)select a=g;salary) from programer;
!1)Fo$ many people dra$ bet$een 2&&& and 4&&&"
a)select cont;*) from programer $here salary bet$een 2&&& and
4&&&;
!2)Display the details of those $ho do not %no$ clipper,cobol or
pascal"
a)select * from programer $here prof1 not
in;)*lipper),)*obol),)Aascal))
and prof2 not in;)*lipper),)*obol),)Aascal));
!3)Jhich institte has maBimm nmber of stdents"
a)
!4)Jhich corse has been done by the maBimm nmber of
stdents"
a)
!5)Display the name of the instite and corse $hich has belo$
a=erage
corse fee"
a)select inst,corse from stdies $here ccost?;select a=g;ccost) from
stdies);
!!)Jhich is the costiest corse"
a)select corse from stdies $here ccost';select maB;ccost) from
stdies);
!#)Jhich institte condcts the costiest corse"
a)select corse,inst from stdies $here ccost';select maB;ccost)
from
stdies)
!()Jhich corse has less than the a=erage nmber of stdents"
a)
!1)Display the names of the corses $hose fees are $ithin 1&&&D< of
the
corse"
a)select corse from stdies $here ccost?1&&&;
#&)Jhich pac%age has the highest de=elopment cost"
a)select title from soft$are $here dcost';select maB;dcost) from
soft$are);
#1)Jhich pac%age has lo$est selling price"
a)select title from soft$are $here dcost';select min;dcost) from
soft$are)
#2)Jho de=eloped the pac%age that has sold the least nmber of
copies"
a)select pname from soft$are $here sold';select min;sold)from
soft$are);
#3)Jhich langage $as sed to de=elop the pac%age ha=ing highest
cost"
a)select de=:in from soft$are $here dcost';select maB;dcost)from
soft$are);
#4)Fo$ many copies of the pac%ages that has the least difference
bet$een de=elopemt and selling cost $ere sold"
a)
#5)Jhich langage $as sed to de=elop the highest nmber of
pac%ages"
a)
#!)Jhich programmer has de=eloped the highest nmber of
pac%ages"
a)
##)Jho is the athor of costliest pac%age"
a)select pname from soft$are $here dcost';select min;dcost) from
soft$are);
#()Display the names of the pac%ages $hich is sold less than the
a=erage"
a)select title from soft$are $here sold?;select a=g;sold) from
soft$are);
#1)Jho are the athors of the pac%ages $hich ha=e reco=ered more
than doble the de=elopment cost"
a)
(&)Jho is the yongest male programmer born in 11!5"
a)select pname from programer $here dob';select maB;dob) from
programer $here seB')6) and to:char;dob,)8888))'11!5);
(1)Jho is the oldest female programmer $ho joined in 1112"
a)select pname from programer $here dob';select maB;dob) from
programer $here seB')G) and to:char;doj,)8888))'1112);
(2)En $hich year $ere the most nmber of programmers $ere born"
a)
(3)En $hich langage are most of the programmers proficient"
a)
(4)Jho are the male programmers earning belo$ the a=erage salary
of the female programmers"
a)select pname from programer $here seB')6) and salary?;select
a=g;salary) from programer $here seB')G))
(5)Jho are the female programmers earning more than the highest
paid male programmers"
a)select pname from programer $here seB')G) and salary0;select
maB;salary) from programer $here seB')G))
(!)$hich langage has been stated as profile by most of the
programmers"
a)
(#)Display the details of those $ho are dra$ing the same salary"
a)
(()Display the details of the soft$are de=eloped by the male
programmers earning more than 3&&&"
a)
(1)Display the details of the pac%ages de=eloped in pascal by female
programmers"
a)
1&)Display the details of the programmers $ho joined before 111&"
a)
11)Display the details of the soft$are de=eloed in c by female
programmers of pragathi"
a)
12)Display the nmber of pac%ages, nmber of copies sold and sales
=ale of each programmer institte $ise"
a)
13)Display the details of the soft$are de=eloped in Dbase by male
programmers $ho belong to the institte in $hich most nmber of
programmers stdied"
a)
14)Display the details of soft$are de=eloped by the male
programmers born after 11!5 and female programmers born before
11#5"
a)
15)Display the details of the soft$are that $as de=eloped in the
langage $hich is neither the first nor the second proficiency of the
programmers"
a)
1!)Display the name of the programmers $ho ha=e not de=eloped
any pac%age"
a)
1#)Jhat is the total cost of the soft$are de=eloped by programmer by
apple"
a)
1()Jho are the programmer $ho joined in the same day"
a)
11)Jho are the programmer $ho ha=e the same Arof"2"
a)
1&&)Display the total sales =ale of soft$are, institte $ise"
a)
1&1)En $hich institte is the person $ho de=eloped the costilest
pac%age"
a)
1&2)Jhich langage listed in prof1 and prof2 has not been sed to
de=elop any pac%age"
a)
1&3)Fo$ mch does the person $ho de=eloped the highest selling
pac%age earn and $hat corse did heDshe ndergo"
a)
1&4)Fo$ many months $ill it ta%e for each programmer to reco=er
the cost of the corse heDshe nder$ent"
a)
1&5)Jhich is the constiest pac%age de=eloped by a person $ith
dnder 5 years ,Bperience"
a)
1&!)Jhat is the a=erage salary for those $hose soft$ares sales
=ale is more than 5&&&&"
a)
1&#)Fo$ many pac%ages $ere de=eloped by stdents $ho stdied in
institte that charge the lo$est corse fee"
a)
1&()Fo$ many pac%ages $ere de=eloped by the person $ho
de=elped the cheapest pac%age and $here did sheDhe stdy from"
a)
1&1)En ho$ many pac%ages female programmers are earning more
than the male programmer"
a)
11&)Fo$ many pac%ages $ere de=eloped by the most eBperienced
programmer from bdps"
a)
111)+ist the programmer;from soft$are table) and the instittes they
stdied inclding those $ho did not de=elop any pac%age"
a)
112)+ist each prof $ith the nmber of programmers ha=ing that prof
and the nmber of pac%ages de=eloped in that prof"
a)
113)+ist the programmer names;from the programmer table) and the
nmber of pac%ages each has de=eloped"
a)
114)Display the details of those $ho $ill ha=e eBperience of 2 years
of ser=ice this year"
a)
115)*alclate the amont to be reco=ered for those pac%ages $hose
de=elopment cost has not yet been reco=ered"
a)
11!)+ist the pac%age $hich has not been sold so far"
a)
11#)Gind ot the cost of the soft$are de=eloped by 6ary"
a)
11()Display the institte name from the stdies table $ithot
dplicates"
a)
111)Fo$ many different corses are mentioned in the stdies table"
a)
12&)Display the names of the programmers $hose names contain 2
concrrence of the"
a)
121)Display the names of programmers $hose names contaion pto
5
characters"
a)
122)Fo$ many female programmers %no$ing cobol ha=e more than
2 years
eBperience"
a)
123)Jhat is the length of the shortest name in programmer table"
a)
124)Jhat is the a=erage de=elopment cost of a pac%age de=eloped
in
cobol"
a)
125)Display the name,seB,dob;ddDmmDyy format)for all programmers,
$ithot sing con=ersion fnction"
a)
12!)Jho are the programmers $ho $ere born on the last day of the
month"
a)
12#)Jhat is the amont paid in salaries of the male programmers
$ho don)t %no$ cobol"
a)
12()Display the 9itle::::::::::::::::::::::2nd
::::::::::::::in descending order of differences"
a)
121)Display the names of the pac%ages $hose names contains more
than 1 $ord"
a)
13&)Display the name,job,odj of those month of birth U month of
joining are the same"
a)