0 ratings0% found this document useful (0 votes) 65 views10 pagesDBMS SQL Queries
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
DRM) Ss a
D. Resort ( Revert no, RAE name, Rest hye Perl dda , Pemt Cy Num guide)
no, Resoit no , Suite pacce )
Heservation ( Puavation no, PECL no, Visiter mo, Checkin, chech out , Total
eee Visttes, gutte we)
sehen ‘1
{ visitetne |, Paame, Lnome, Wistter adds)
Reve
hao Rastt name — Reset bre Pesoit Addy Resort City Numdutte
Row Wlesin Recveakion 731, Castle Las angles os
Ror duywy Home Rotinativn — gas, Fire dak Sweysteind 35
Ros Buss AWstowte Ago Paltos Ponte 40
Roy Sunset Gotowtg m Aso Stone Log angels Jo
Ho us tom i he
Ros EUte Plaza = Bubinevs G38 Voss Calépetrion
Howton
ee Al | al P| Visther
Suse no ae no pepe Visite no, Frame ,Lnamg , Visiter addr
ee 7 wee 56 Sohn Swath Bamgalote
lor Roz A500 -
lo3 Rou 6g00 Ves Joy te English chennai
5s oh 3
dor Roo 4500 Vas Sennifs Baty Heglrorba
dou Ros S000 Vio} pltte. — Konq— Mompebate
V30 Famy Wallate Myst
VE2 — Ramuh Divayan Chennai
Ruuva fe |
Pauvatin ne fueitne Visiterne checkin checkout fee ae no
rAsus Roy Vee A Am 30pm
356 lo
134sr Ro Ves UU Am HL Pm BS a:
14569 Ro} Nas Dm 1 Zorm lod 20)
0 os
e492 Ros Vio em tam 44,0 Li
0?
15629 203 Vas lem 101 30am 600 Jo?
20)
° 3
(4762 Roy Ve2 Jem dam so
@ scanned with OKEN ScannerSeuntes
ay Wotle the sq te Lo fall dilarls tf all neoly ern
Jes Angel i
os Anaales
SAet x prom pasett
toler e City =" Los Angela ;
bs bvrile the Sgu
dn Cink gull dedaile 4 all sessits having
Wem beor U
Of Sutter moe than so
Sclect ¥ fiom Resort
fohae wumsuite > 305
fr lasite Sgr ale list visite km Bhlendins BSdes by fst name
Select Frame, Lnanne , Vesth m6
Fsom Visiter
Cader lai Frame Asc 5
4.
SAudeak (Ss, Name , Addis, majet, bdate)
Course ( Comme no , Cname , dept )
Ensell (sen , Course ne , Guasty » Gaade >
beek _ Adoption C Counse no, Quarter, Book isbn )
Tent (Book isbn , Book title , Publisher , Author >
STopent™ Course
sen Name —-Aeddareys Majet — bdate Qurme no Crame dept
IRCS01 Joga Smith Bomgaltte DBMS 21-Jen-86 cs) AT cs
Jacsot Tanned Mage CN 21-Feo-%6 Ec3s NT Ec
19659 Alice Momaalore Python 61-Jun-49 C833 os cs
RECS ANY Vdupt Me 13-Aug-16 ¢sy Dale cs
esos Samthyo Bangalore «ATC 2) = Duly 14 CSM Cyber cs
“ vi ; Seeusthy
© scanned with OKEN ScannerEngobe
Boor — Adoptton
SSN Comme ne Guarir Gaade
Wesod Css Woy 5 Cone ne — Puarter Book -tshn
Igecos ocean S06 6 Css) wo? 133
g
lyecsq 8) WO 3} 0833 wor 183
€c3) S06 20}
Wqesar C841 $04 g ®
cst S04 d0s
tecso} CS 4H woq 4%
Texte
Rook ishn Bock-ditle Publisher — fjuthor
1a Hata bare pearron Novathe
93 Hala bore Mcgraw Hil] Edward Ainge
Jo} unix Pearton “Taner bow
205 Auoontl Oia Rewelorn Navathe
133 ite Pragferraretng Rausncdown Golvin
[23 fate structure Hachette mant
Livae
Guusies
at List no-of ceuses Laken Student ramet Jogn Seti tn voles
dooa (e., Quarter ~ wo)
Select count (#) wom course,
fohere Gand te (Select eu Cousens pom Emolt
toh Quarta ="WOA" AND
E.ssn =S.SSN)5
«
Ensollae student as S
by Produce ov Ligh of tent broks (include Coursene, beok_ishn , book Little’) pot
Courses ofpred by "es" depastonenl dhot have wed mote than 2 beoks
Select 8. courseno, T. Rook. tshn , T. Brak title
From Coume C , tent T , Book_ Adoption 8
bore Ce dept = “es” AND T. Borkh£sbn = 8. Book icbn AND
C. Cowrene = By cowsend AND p, Coulseno in ( Select Couve no
deem Book —Adop ft on
Group by Counse, no
© scanned with OKEN ScannerMaving count ( Coursens) > 0)
Ourdes byl Rock title Asc 5
c Bb day clepa 4
Y List amy clepastvreat Chat has al Hs adoptet books published by
Pewsena publishing 4
Baleck depl {fom Course
where coumeno in( Selec courte no (for Book Adopt om
Ishere Book _tsbn in( Select book ighn fom Tent
fohese publisher= " Peaasen ye
Ay
Customer (Ci, Name email , Addnos , phene >
Thoms (Item me, Bm name , Paice, Brand )
Soles (Crd, Ftean-ro AE Dts, Amevnit , Sale deste )
Supplta ( sid, Same, Sphewe , Saddrevs)
Supply ( Std, Them nes Supply dode , 9TY)
Customer
Cid Nome — ernatl Addr’ Phene-
wt Pavoun. exbe@qprail tore Bomgalore 4S F6SU22)0
Prashanth — laa @gmadl on Mangalore 4963894023
Ravi navi s@gmatl-con, Muysere
Hydwabad F723(23524
984977652!
ddd
BIG2TEV4 IST
333
hay Sagar Sagg7@Iohee Lore
555 Suro Suan 21(@Yaheo- om Channaak
Suppl
Sia Snot
123, John 24680721 Chennae
9963562189 Banaalote
phone Gaddaers
4s Alice
484 dorcaine = 791232312 Mysote
12% Groh — 9769589213 Mureboat
© scanned with OKEN ScannerMeme (3
Mem mo HW Them hame Price 8
Pom A
56 x 2400 Lave
58 Y 3500 Hem
éo z 54.00 Lv
62 A oad Adidas
64 k ¥2e0 Purnia
66 M 4000 Nike
Soler
Cid Hem no H Thoms Amount Salu-date »
nN 56 150 500 01-Jun-14
ar 58 too 1500 2U- Feb-!9
Ww 58 Ds 3000 B-8ek- 19
que oy 130 Aso ts Tame l9
sss 62 250 gooo =O -Tun-19
gaa 66 400 000 iy —HoemeTh
Su
err Thomo Supply dake PTY
193 56 Ol - Feb -19 toe
123 60 t2- Jom -19 (ey
434 58 2 = Jam -14 4s
Hse 62 5 - may -20 200
1249 64 Is -Dee~20 50
484 @ Qle Tian 14 850
tonite Quate 46 the folloustnay,
at List thems purchased 4 cwstemer “ paorlanth”
Seleck Tem name
From Itemgas I bala on S
phe atemono in (Sele Fem no from Sales , Customer as ¢
tohae Coname = “Prashanth” Aw dD
Citta = $,Cid);
bh Petrteve theme supple by all Supplies —diom It Foun 19 fo 30 Tan 14
Selut Hem name tom Tht 5 Suppl
ohare Item no te (Selut Stemne ftom Supply
phar Supply dode Between Yor-Jam-(9/ AWD
‘30-yam -19');
@ scanned with OKEN ScannerCh Betas of castenves sohowe lebal rage of fem 6 entte tam
5000
Select Cid, Name, emarl Address, Phow«
From Customer as ¢
these Crd ta (oelecl Ciel fom ales a4 S
bohue Ctéd = S. ced
Group by Cid, Name, ematl Addrom , Phone
Having Sum (Amount) > 5000);
dy Total gala amount , total fem , avg gales amo Of, al Stems
Select sum Amount), SUM(H Thm) , AVG (mount )
From Salere Thums as T
lohve 1, Etem ene = 8. Jtem nds,
“ Aispley customer eho have mot pourchated saa Them
Select” Name
From Cuntorncr
whe NOT EXISTS ( Selec * Faom
fohue cd =“ 33a") 5
salu
© scanned with OKEN Scanneri}
Guores | | a | |
Life
A Keble fu names cof employers sho wok tu ffie
= ciparfmenit thot ou athe cunplogger wail Hie Aighut
Liat ep ayes
1 name
employer
she etre = (telet? no
Hin eee crupley el
—___tufurct satay die
Csetedt max Casalay
fjeom oe
[—Ffron eet |
00+ (seluck nna) :
fom rl _|
po) dalle nt tine amg oe name, fie
[ttn tl acc bch
Create view Ve ye 0 eS |
“| hele Ee nome, E,golory
| | som Basle Dependent _D. stent A
| Volare ots D.£gsn and 1
uf Dno_= A. Drum ancl a
{op A. Daaim._= "Rese rey
woe d
© scanned with OKEN ScannerCriecte view V.prwmject as
| Slee P-Prome, D,Daame , Count (#), Wehours
© scanned with OKEN Scannerbe Count the cowlomur util prada chew
Eauyalon vege.
Selut grade, count Miptinct custornen id)
mm uustomesu.
wot (OF 4
peteat oe > (Sobef )
tot nap gpa
shat Clty = "Bangolene)—
© scanned with OKEN Scanneraol Sisalosmantd. , Sname ,C cust nome S. Comuticfon
union |
. ° NO ‘ gelecl
f ¢, |
| ont ow)
LL.
r i
© scanned with OKEN Scanner