Professional Documents
Culture Documents
1#5/ 1#&+ 1#&) 1#&& EName $aran Di-a.ar Di-!a 0tul 1riti. 0.sha! 03a! San3a! DOJ #1%#&%'# #1%#,%') #1%#5%/) #1%#/%/5 #1%#&%/2 #1%#'%// #1%1#%// #1%#+%## Job Dire(tor Manager Programmer 0nal!st Programmer Manager "ler. Salesman Dept no )# 1# +# +# +# ,# 1# ,# Salar! )'*### +#*### )#*### )5*### )#*### +5*### 1+*### 15*### 5### "omm
14 Displa! 5etails of all emplo!ees 6ho earn bet6een 1#### an5 +5###
PART II Write SQL statements for questions 1 to 5 using the table EMP Empno 1#1# 1#+, 1#,' 1#55 1#5/ 1#&+ 1#&) 1#&& EName $aran Di-a.ar Di-!a 0tul 1riti. 0.sha! 03a! San3a! DOJ #1%#&%'# #1%#,%') #1%#5%/) #1%#/%/5 #1%#&%/2 #1%#'%// #1%1#%// #1%#+%## Job Dire(tor Manager Programmer 0nal!st Programmer Manager "ler. Salesman Dept no )# 1# +# +# +# ,# 1# ,# Salar! )'*### +#*### )#*### )5*### )#*### +5*### 1+*### 15*### 5### "omm
14 7in5 the lo6est pai5 emplo!ee Sele(t empname*min8salar!9 from emp: +4 List a-erage salar! of programmers Sele(t a-g8salar!9 from emp 6here 3ob;<Programmer<: ,4 List the emplo!ees 6ho earn a salar! greater than the a-erage salar! earne5 b! the emplo!ees of 5ept 1# Sele(t empname* salar! from emp 6here salar! = 8sele(t a-g8salar!9 from emp 6here 5eptno;1#9: )4 Displa! name* annual salar! an5 (ommission of all salesmen 6hose monthl! salar! is greater than (ommission Sele(t empname* salar!>1+* (omm4 7rom emp Where salar! =(omm an5 3ob ;<Salesman<: 54 7in5 the number of 5epartments Sele(t 5eptno* (ount85eptno9 from emp group b! 5eptno:
PART II Write SQL statements for questions 1 to 5 using the table EMP Empno 1#1# 1#+, 1#,' 1#55 1#5/ 1#&+ 1#&) 1#&& EName $aran Di-a.ar Di-!a 0tul 1riti. 0.sha! 03a! San3a! DOJ #1%#&%'# #1%#,%') #1%#5%/) #1%#/%/5 #1%#&%/2 #1%#'%// #1%1#%// #1%#+%## Job Dire(tor Manager Programmer 0nal!st Programmer Manager "ler. Salesman Dept no )# 1# +# +# +# ,# 1# ,# Salar! )'*### +#*### )#*### )5*### )#*### +5*### 1+*### 15*### 5### "omm
PART II Write SQL statements for questions 1 to 5 using the table EMP Empno 1#1# 1#+, 1#,' 1#55 1#5/ 1#&+ 1#&) 1#&& EName $aran Di-a.ar Di-!a 0tul 1riti. 0.sha! 03a! San3a! DOJ #1%#&%'# #1%#,%') #1%#5%/) #1%#/%/5 #1%#&%/2 #1%#'%// #1%1#%// #1%#+%## Job Dire(tor Manager Programmer 0nal!st Programmer Manager "ler. Salesman Dept no )# 1# +# +# +# ,# 1# ,# Salar! )'*### +#*### )#*### )5*### )#*### +5*### 1+*### 15*### 5### "omm
+4 List a-erage salar! of all 5epartments 6hi(h ha-e more than , emplo!ees
,4 "reate a -ie6 5ept1# (ontaining empno* ename an5 annual salar! of emplo!ees in the 5ept 1#
)4 7in5 the 3obs that 6ere fille5 in the first half of 1//5
54 ?nsert a ro6 6ith the follo6ing 5etailsA 1#5/* Ba3esh* #1C1#C+###* salesman* ,#* 1+###* +###
PART II Write SQL statements for questions 1 to 5 using the table EMP Empno 1#1# 1#+, 1#,' 1#55 1#5/ 1#&+ 1#&) 1#&& EName $aran Di-a.ar Di-!a 0tul 1riti. 0.sha! 03a! San3a! DOJ #1%#&%'# #1%#,%') #1%#5%/) #1%#/%/5 #1%#&%/2 #1%#'%// #1%1#%// #1%#+%## Job Dire(tor Manager Programmer 0nal!st Programmer Manager "ler. Salesman Dept no )# 1# +# +# +# ,# 1# ,# Salar! )'*### +#*### )#*### )5*### )#*### +5*### 1+*### 15*### 5### "omm
14 Di-e an in(enti-e of Bs45### for the emplo!ees 6ho 3oine5 before 1//#
+4 List the emplo!ees of soft6are 5epartment 5ra6ing salar! less than )#*###
PART II Write SQL statements for questions 1 to 5 using the table EMP Empno 1#1# 1#+, 1#,' 1#55 1#5/ 1#&+ 1#&) 1#&& EName $aran Di-a.ar Di-!a 0tul 1riti. 0.sha! 03a! San3a! DOJ #1%#&%'# #1%#,%') #1%#5%/) #1%#/%/5 #1%#&%/2 #1%#'%// #1%1#%// #1%#+%## Job Dire(tor Manager Programmer 0nal!st Programmer Manager "ler. Salesman Dept no )# 1# +# +# +# ,# 1# ,# Salar! )'*### +#*### )#*### )5*### )#*### +5*### 1+*### 15*### 5### "omm
14 Di-e the (omman5 to (reate the table EMP 6ith the follo6ing (onstraints Empno E NOF NGLL* primar! .e! Ename E NOF NGLL Salar! E Default 1+### an5 salar! =1+### an5 H 5####
,4 7in5 the a-erage salar! an5 a-erage total remuneration for ea(h t!pe4 Bemember salesmen earn (ommission
PART II Write SQL statements for questions 1 to 5 using the table EMP Empno 1#1# 1#+, 1#,' 1#55 1#5/ 1#&+ 1#&) 1#&& EName $aran Di-a.ar Di-!a 0tul 1riti. 0.sha! 03a! San3a! DOJ #1%#&%'# #1%#,%') #1%#5%/) #1%#/%/5 #1%#&%/2 #1%#'%// #1%1#%// #1%#+%## Job Dire(tor Manager Programmer 0nal!st Programmer Manager "ler. Salesman Dept no )# 1# +# +# +# ,# 1# ,# Salar! )'*### +#*### )#*### )5*### )#*### +5*### 1+*### 15*### 5### "omm
14 Bemo-e the ro6 6hi(h has an! of empnoA 1#1#* 1#,'* 1#&+
+4 0ssume that there is one more table DEPF in the 5atabase as sho6n belo6A Dept no Dname Lo(ation 1# 0((ounts Ja!anagar +# Soft6are ?n5iranagar ,# Sales Ba3a3inagar )# Besear(h $oramangala Di-e the quer! to 5ispla! number* name* 5ept* lo(ation of emplo!ees earning more than +5###
,4 Di-e the quer! to 3oin the t6o tables EMP an5 DEPF
PART I 19 Write SQL (omman5s for 8a9 to 859 using the follo6ing table 7B?ENDS A No 1 + , ) 5
a9
055ress 1)* Dol5en En(la-e )5* Jasant Jihar ,#* Son! Jilla ,5* Sil-er Ferra(e 5* Wilson Dar5en
b9
(9
?n(rease age b! 1 for all those born bet6eeen Januar! an5 Mar(h
59
+9 a9
Di-e the output of the follo6ing (omman5sA Sele(t M?N8age9 from frien5s:
b9
PART I 19 Write SQL (omman5s for 8a9 to 859 using the follo6ing table 7B?ENDS A No 1 + , ) 5
a9
055ress 1)* Dol5en En(la-e )5* Jasant Jihar ,#* Son! Jilla ,5* Sil-er Ferra(e 5* Wilson Dar5en
b9
(9
055 a ne6 ro6 to the table4 Gse the follo6ing 5ata A Ba-i* )5* Bose Dar5en* +#C#'C'1* 12
59
List all those frien5s 6ho are born in the !ear 1/'1
+9 a9
Di-e the output of the follo6ing (omman5sA Sele(t M0K8age9 from frien5s:
b9