Dbms Assignment 2
Dbms Assignment 2
un a tlatin) dntane.
uidntteal.
Chomeginy Athaiduty :-Al dtbiilts uth
a tualatim mut haue the dame
selaton
Can
chang
Nort Bmleddd Ualues:- Valu usithin a
mst de atemi
selatinel ditalbase
dufhliat.
Ldata and wndÚte cthat
cthu
On cdhu
huy iay a oucial vshy uin
*Lemaliyatin:-
date nae
diminat dota edundany
dstabase duig.
datatase vonsialncy.
BLUsLs,that cdato
i-.doatil Bnthgt,i- &nsusus
aluly ae valic. t fsasst
oefuns diivan
ineonltincã) cand data lou y nsing
tis
dhat youign ay fust
teugntys= thiutiy dhat
kw in oelstid tally. thy tabliss oaloton
atbetu
conitiaila foau
h delotiin
citgit, conilraito foeus n the cnen-t ,
echanlm-ja onstialits cae
J;
atalg
canet alse.
seLCT nome
ARoM hat
lOHERE huil TN
SELQLT huol
PROM catalgg
LOHeRE Adl= (seLELT die PRoH csuhhliva IHERE
Sname='Aome slsdgt duutliru')
AND hausl NOT ING
sELCCT hil
PRoM catalegw
Aname)
SELELT d l
FROH chuphlts
OHERE NOT EXIS 7S C I.
PROM UCatalg
sed fhano cand grwr haito
SELLCT l i
FROM dufhhlina
OHERE ENSTS c
SELECT
PRoM Cataleg
JoIN art oN Coud =pfue
AND EXSTS
SELECT
FRoM
J;
'grun'
jolling ulatioy
namesß aboaft csuch dhat flite
t the
SELLeT amome
fROM QCeapt a
WHeRE NeT EXI STS (
SELECT
FROM
JoINS
UMERE C. a = a aol AND erwalay C= booo
cvtefct hor sten uhe
SeLeeT e. ud,MAX (a.Oisimgog
fRoM Bnleyee
TOIN Cvbla coNe. atl= Cuid
JOIN Nouoa7t aaON ci eeal aia l
GROUP
sauing sunt (*)>34
to
fend te named
JAonsldy:
SELELT
e. erane
FROM Emloys
coHERE e.satay <(
SELALT MIN /1 huiey)
PROM Jghta t
Jleneus
J;
all atueroßt - jor thu' atoaht.
seLeeT a: name , AVG (e.vlalo)
PRoM Aneolt
JoN
JOUN
WHERE
GROUP eruisrange uooo
By a,
mam;
tenc the mames
dome
SELLCT eunm
fROM Snphyue e
Jo IN a- aid
OHeRE a. aname LIKE.. Gsung 7'j
cme than
FROM
ONERE N&T SX LSTS (
sEECT
FROM Enfleyes e eid
JoN vtipleol CON e lol =
JOIN
a e.o o o00AND
9HERe a. eruisgge
<f
funt cthe
the name
polot.
calay
FROM Enpleyee e e
SHERE alany C
SELECT AUe (e2-salay)
PRSM Bnplayus e a ceLol = c. ecol
TOLN CUiol (oN e2
ANDe lNOT IN (eeLceT ol frorn crhuo)s
uw 3e- Considr dhe
Laantmnent as aut
SALLT erhame
FROM Bme
ToN DEPT d ON e.J me = d- Dvnm
cOHERE dDunum =(dELELT D no rROM m
lOHeRE Name Rav)
r) letine the no.
empleyeccnt4)
SÊLE
"Rang".
FROM DEPENDENT
LOHERE £SSN = (SELECT SSNAROM EMP oHERE
NaME =Pau")
--fenale
olshinelerto
SELECT emam
Mg,HSSN
JoN DEPT d oN esw N=d·
oN d Dmum = dl.p mun
JOUN DEDT L oc dl
eecation = DELHI'
OHERE dl.
AND N0T £X1STS (
S£LECT
fRoM DEPENDENT
SEX =»e?
OHERE £SS = e. SSN ane
sELLLT Vame
fROM em >S0006
IHeRL Drng = QO ANo Wala
AND Sx - p7
ctt csE"lefratmunt olatail
SELECT
fRUM DEPT
wHERE D mom csE;
(lusye- Cond cthe follaslng coRPANY Lelatabase.
) Retie cthe name Ruearch
Keartmnt.
OHERE DEPT eht-oe)
Aname=
pnol the mama partorent
rlome (Emh Do wORKS- ON bo ÅROJELT) 4OHERE
PRO JECT
Dnum y
A49) abve ctha ssn_ eohartnent numler
Gn Do mo =y)u r
(TT SS NCE MP LOHGREBnfh. Domo =4) n
Cdutor ssN(mh HERE
TT SsNcs Emh)
du) etiie the names
eolyhartmenls.
ome (tmh o OEPENDENT)
7T lame (Bh) T
fuiol cthe
the name -hubetshe.
'SLRI tudint.lome
PRoM dtrielt
ISSUE.Rsll ,
INNER TOIN ok ON ISOE, TE BNBo0%.T«BW
OHERE B00K. lslhu ABO:
( it ttte all lostki utuodent RAM.
8£LECT BooK Tttl, Book. the
FROM utudnt
INNER ToIN IssU£ ON Atdent. Rollasne Rl n.
TNNER JoN tudent ON Is3UE. gll mo = sidt.
SELELT BoOK. be
PROM Book
LOHERE Rbssk. lllslshuo A8e;
Falatinal Agleas
9T Roll mo, vlame (o bonch=sEl utudent)
vlame Ra Roon)
Etnith'v be4=fonw')
Os3#, kdian ,be, (Ensl (S#h , c#, detin ^
Zad(h,c#, dcon
) S#, Ct INkoLL(S## ,c#, aotien)y
( tt, +l GRADE (S#, C#,(0, yea)}
Ulus 7i- liit the
- thathane 3
cdhe
oudtt).
SELECT til
FRoM cSUA =tconuti
comulö ucwna 'ANDcoudity
lHERE diht = namm
) find the l0sa all utudent--.. n dhe dudto
) tind
SELECT DISTINT tudent.TD
FRON studint
VON tatRy ON student. o= tales. TD
JOIN eachw oN daku CgUe-10 = taehs curse D
AND talRyseo uol= tachus sc
AND alkw
dakua thaous. csemst
AND aks yar diactus. yar
wHERE wnsteuctr. mame='&unstin;
cnatuoto.
'sELETwntucte
HAX (etaiay)
nd all wntuto
salay
SLLLT TD,
TD, (nane
FROM wntuotor
wHORE Ldalasy -(sLLeT HAX(csalay) FRoh (urutucte;
) fid dhu ensllment da seatiow dhat os
SELQT lcowcél, dc -d
coUNT(*) A ensllnest
AR0M taks
=20/7
WHERE semesl="Jall" AND Year
aamum ensallmnt, ava al
the
SET
wnERE(Llay -dalay
dt-non= Contu- sdelnc' ;
cthe csde