Professional Documents
Culture Documents
SQL Zero To Hero With Mindmap
SQL Zero To Hero With Mindmap
Gtroup
tte1'1in« J
·Ol2Da? BY e!_!j~ l]
d,t DcSC
nt
SQ
ALIAS AS
fxomRle=:
An Alicu is cna.tcd wtfh ·m · l'11e.1onf,
S€LEcT tolu.mn_n4me f\S aliClS-narne
FROM table .. ncimc~
GtROUP Sy
=) (GttooP sy cotuM tJI
E"Kcirnf?!t:
set~CT column_ nomc CS)
FROM tablt_name
WHERe condih·oo
Gtl?.OUP BY Column_~ls)
ORoei BY colamn_na111c cs>;
~ (H4Vin~ J SELECT' colitmn narwirC.I)
- - · FtoM table name
.£-.a.mple. WHera condition
GcRoUP BY col-."'n-namt 00
HA\'l ll<h Condition
OiD!R 8V tolumn...naM&tl);
➔ fORDeR BY (Ase~ or @RDefl By De~
rht order b~ ~wonl i, UJtd to Sort -f"1.
,.,!tllt -Se~ i1'1 o.sttriid in§ o.- dtsetnt!linJ order
E~nmp.k:
Se LECT colwnni, Columna, •••..
F~oM tciblt-no.mt
ORDE~ B'I coluwnni, tolu.rr,,at,, ..... Asc/DtS~
JOINS
:!J [rtJNeR 'J"OIN ]
'this kc~c.uord Selecfl -that- ho.Ve ma•chin§ VAl.w,
i"' boffi ta.Ya
€-ntmple: Setecr columl\_namces>
-== __. ~RoM hb\ei
:tNN£f101N t'Cll>lct
OM table .column_name= blbtcz. column_ narn,,;
_ _ _ _-.
~ ILeFT 101 NJ "
f-.omp le: SE l ecT t.olllmn_namc C.s)
- = fROM ta.blt.1
LEFT'JOIN tal,k '-
➔ ~ IGtHT!OIN]
ftamp,le : S~lecr cola111n-"6tw1e(s)
... ,=i- =-- FRoM ta~le i
RI Gt MT -JOIN ta.l>le ~
ON taliet.coluthn n4mt =- t:able2. cofumn_rnn,;
-
~ 1-
J: U-L.L_ TI>
_I N]
_____