You are on page 1of 24

c

c
c

c
CREAR UNA BASE DE DATOS EN SQL SERVER

c c c  c c c c c c c c c 

c c  c   c
cc c
c cccc !c"c#c c
c\$ cc
c 
c 
c 
"c
c   cc cc c 
c

cc% 
c#


"c

#&%c'(%c%&c)&c)%*+c
c
,"c )
c c % 
c
#


c -c c 
c c 

c

c 

c  !c c .c
 
c c c
"c
/"c 0c c 
c c 
c -
c c

c c c c c c 
c
.c
c cc c 
"c
1"c )c c
ccc cc
c 
c c c 2c c 

c \$ c
"c
c
c
c
c
c
c
c
c
c
c
c
c
CREAR TABLAS
c
c cc c
c-c
c  c
c
,"c %c c c c
c )
c .c c c c

c
 c c
c c "c &c
  c -c c 
c
c 
c -
c c

c c c c
*c .c 
c c

c( c*"cc
/"c 'c2c c 

cc
 c 
c c

c c c "c
3c c 
c .c

c%"c
1"c !cc\$ cc c cc ccc cc
 c ccc
\$ cccc"c

CREAR DIAGRAMAS DE BASES DE DATOS

c
c c!
c c c c c 
c 
c c c c c c c c 
"c c c
c c cc
c
 c
c
,"c %ccc c 
"c
/"c 0cc
cc
c -
c c
cccc)c.c
c( 
c c c
c c 
"c
1"c cc
ccc45 6"ccc 
c cc2c c 

"cc

c
c
 c c
c
c
c `
c
c
c

Crear relaciones entre tablas

c
&c
c c c"c c
c c c \$ c c c 
 c 
c c c
c c c  c c .c c -c c 
c c c 
 c 

 c c c
c
"c
c
Ingresar datos
c
&c c c c -c c 
c c 
c -
c 
c c 
c c c c \$ c c
c 
"c
c%c*c.c-ccc)
c
ccc.cc

ccc

c 
c
"c

c
ANALISTA DE CONSULTAS (QUERY ANALYZER)
c
\$cc\$ .c%.cc c-c c !cc
ccc\$ ccc
 
c2 c
 cc cc c 
c !cc 
c

c !"c
c
Ventana de trabajo
c
!cc c2
cc
 c
c
c"cc
cc 
cc
cc
c

c c c 
c 4c c 
c )6ccc c  
c"c &c c
c 
c
c c#
 cc c
c

c !c
ccc
c 
cc c2 "c&ccc
c2
c  c cc 
c cc
 c
c2c c
c.c "c
!cc c-c
c

c\$ cc c

c c
c7"c&cc
8cc ccc cc c 
c 
ccc
"c  c
c cc
c 
c -
c c c c -c c c c c .c  8c c c 
c c c c c 
c
 "c&cc2
c
cc2c
ccc c 
c% 
"c

Digitar y ejecutar una consulta

c
&ccc c
 ccc cc

c9c

"
c
:
c 
c 

c 5-c   c ;c <#c &<c  c
# 
=)
c ;c# 
>c (c \$ c c c c c &!&#*c ?c:+ c
8c c  c  c  c 
c c 2c c c c c 

c
&!&#*c\$ cccc

c 
cc c
c.cc c
c c c 
"c &c c

c )
c .c 

c .c 
c c c 
c c 
c % 
"c c 2 c .c c c  
c c c 
 c   c
c 
c c c

c&2 c
 "ccc
c c

c
c
 c c
c
c
c º
c
c
c

Guardar y
recuperar una
consulta
c
&c 
c
c
 c c c

 c   c
c c 
c
c  c 

c
 c .c
2 "c c c
-c  c

 c 
c
 c c


c   c


c 
c

 "c
c c
c
c  c c
 cc
c
 c
c
,"c &cc7c%-
c-cccc
c  "c%cc2c c 

c  c%-
"c
/"c 
c c 
c
 c c   c c 
 c .c c c 
c (
c c %-
c c c

c cc
 "c
c
cc c
 cc
c
 c
c
,"c &cc7c%-
c-c cccc
c%"c
/"c 
cc
c
 ccc
 c.ccc
c(
c c%-
c cc
c cc

 "c  c\$ ccc"\$cccc
c c-
c cc"c
!c7c
c
 c   cccc c7c%-
"c
c
Cambiar ubicación de bases de datos SQL Server del servidor
c
# cc c 
c c !cccc
c
c-
 c
oc &c-
c c 
c\$ ccc "cc
oc &c-
c c
c\$ ccc "cc
&
c
c -
c c  c c <# @%-
c c 
@ 

c  !c
@  !@)<"c c 
c 7c

c 
c c c c c 
c -
c c
c
c
cc

c 
c
c\$ cc c

c
c
c


"cA
ccc
cc
c


ccc
c c c c
c-
c ccc c 
"c
c
c c c c 
c -
c c  c c c 
c 
c c  
c \$ c -
c

c c c 
c 
c c  !c c c c cc c 
c c  cc c
c<# @%-
c c 
@ 

c  !c@  !@)<c.c \$ 
c cc c 
c

c
c2
cc<) @<c
c
Mover Bases de Datos de Usuarios
%c
 c
cc
ccc c 
c c  
"cc
c cc c 
c
 c< <ccc
c c
 c2 
cc cccccc c

c c
c
c
cc

c
= -= cB Bc

c
c
!
c cc
c
c-
c ccc c 
c4 " c.c " 6cccc

c4<) @<6?c
c7
c

cc 2 ccc c 
cc c c "c
c
cc

c
=-= cB BB) @ " BB) @ " Bc

c
c
%-
c-.c\$ ccc
 
cc
ccc c 
c c  
c\$ c

c
c
c
c
 c c
c
c
c è
c
c
c

Lenguaje SQL

&c 
c
c c !"c!cc
c c 
 cccc
8c-c
!

.c c 3 c 4-
c c c % c -c #6"c &c  2c
c  c 
c
9Sequel>"c
c&c  2c \$ c -c 
 

c  c 
c .c  c 
c -c 
c c  !ccccccccccccccc
4   c .c ! c c 4! 2c c #
 c &  
66"c %-
c  

c 

c


c c  2c  !"c % \$ c c 
c c 

c c  !c c c 
c c c 
c
 2cc c
ccc.
cc
"c
!cc-c
cc

cc9! 2c cc c)
c
c& >"c
c &c 2c !ccc c
c
Lenguaje de Definición de Datos (DDL) :
c &c  !c ))!c 


c cc c c \$ c cc c 
c c
 c.c
c\$ c c"c
c
Lenguaje de Manipulación de Datos Interactivo (DML) :
&c  !c ) !c  .c c  2c c 
 c 
c c c c 
c c .c c  
c

c c "c*8c .c ccc c.c
c c ccc c
)
"c
c
Lenguaje de Manipulación de Datos Inmersos (DML) :
c !c
cc c !cc C cc c 
c c
c 2c c
c c


ccc

c!D3c#

cc:
c.c#"c
c
Definición de Vista :
c &c !c))!c .c
 cc c"c
c
Autorización :
c &c !c))!c .c
 ccc -
c c
cc
c.c"c
c
c &c  2c \$ c  .c
 c c c 
c c   c 
2"c
A
cc c !c .
cc%c c


c c c
c c c


c c  "c
c
c
Control de Transacciones :
c
c  !c .c
 cccc

c.cc cc
"c
c
ccccc
Estructura Básicas

c !c  cc c ccc !c

c c1c  c c
cc
Select = (×)
From = (x)
Where = ( )cc
c
Mc La cláusula Select 

 c c c
c c 
.c c c 
"c c c c
c
c 
c\$ cc ccc 
c c c
 "c
c
Mc La cláusula From 

 cccc
c c

c#
c cc
"c!c
c
c\$ cccccccc c cc"c
c
Mc La cláusura Wherec 

 c c  
c c c c c 
"c #
c c c
 
c\$ cc 
c cc
c\$ cccc  c:
"c
c
c c

c
c
 c c
c
c
c ]
c
c
c

c 'c
 ccc !ccc
 c
c
Select A1, A2.................An
From R1, R2.................Rm
Where P
c
c # c %c c c  
c .c  c c c "c c c c  
"c &c 
 c c
\$ cccc cc
 c
c
× A1, A2.........An ( P (R1 x R2 x.............Rm))

!cc%,c%/""""""""""%c c 
c  c  c
c c
c4E6cc
c

c

c 
c c
cc
c\$ cccc  c:
"c
!c
cc

c#
c cc
c
 ccc  c:
cc c
c c c 
c 
c c  
c c c   c 5-c .c  8c 
.c c
 
cc
c 
c cc  c"c
&c 
c c c
 cc !cc
c  
c c"c#
 
c c
 c
.cc 
cc2
c
"c9&
c
c
c c
cc  cccc
)
>"c
c
&2
c
cccccccccccccccccSelect Nombre_Sucursal
From Depósito

Operaciones de conjuntos y tuplas Duplicadas

!
c  2c c 
 c 
c c c c c 
c c c c 

c c

2 
"c
c
c cc c  ccc
"c&ccccc c

c c c 
"c 
c 
c  !c 4.c c 

c 
c c  2c c 
 c

6c c 
c c c 
"c %c  c c 
 c 
c c  c

=  c cc
c c cc\$ ccccc 
"c
&c \$ 
c 
c c 
c \$ 
c 
c c c c 
c 
c c c
c Distinctc  8c c "c 

c c c 
 c 
c c c \$ 
c \$ c

"c
c
SELECT DISTINCT Nombre_Sucursal
FROM Depósito

(
c \$ c  !c c c 
c c c c c 9c Allc >c c c c \$ c 
c c
c
c 
"c
c
SELECT All Nombre_Sucursal
FROM Depósitoc
c
 
c \$ c c c c 
c c c 
c 
c %c c 
c 2
"c c
 c c c c c 
c c 
c  
c c c 
 c c 
c 2
c 
c
)cc\$ cc
"c
c

c
c
 c c
c
c
c ë
c
c
c

La composicón de tablas
!c

c cc
ccconcatenarcc c cc
cc c
"c&cc
c


c c c 
c c columnasc c c primera tablac
unidasc c c columnasc c c segunda tablac .c c c c c
c  c 
c concatenacionesc c filasc c c primera
tablac conc c c c segunda tabla"c &
c c  .c 7c  
c
\$ 
c  c c  .
c 
c c  c c
c
"c
c
c 
c2
c\$ 
cc
c 
c
cc
c
c c \$ c -c --
c c  
c  c 
c 
c c
 
c 
c 
c c c c c  
c 
c c 
c c
c c c c c c 
c .c  c
\$ 
c \$ c c c c c Fc c c 
c

c

cc
ccc

c
&c 
c 
c c 

c  
c c 
c 

c .c c c c 
c c


cc c
"cc
c
!
ctipos de composiciónc cc
 c
Úc &cproducto cartesianoc
Úc &cINNER JOINc
Úc &cLEFT / RIGHT JOINc

El producto cartesianocc
&c

c
cc c
c c

c cc
cc

c
cc

c cc
c c c 
c c columnasc c c primera tablacunidascc c columnasc c c
segunda tablac.ccc ccc c
ctodas las posibles concatenacionesc cfilasc cc
primera tablac
cc ccsegunda tabla"cc
!cccc  cc

&c producto cartesianoc c  c poniendoc c c FROMc c tablasc \$ c \$ 
c 

c

c
ccc

c
c c
cc
cc"cc
Nbtablac  cc cnombre de tablac
c cnombre de consulta"cc
ccccc
cc c 
ccC 
cc   IN basedatosexternacdespuésc ccúltima tabla"c

cc2
cc 
c.ccc 
cc
 c c cc  cc c
cc  c3("cc
0.c\$ ccc c\$ cc

c
cobtienec
ccposibles combinacionesc
c c 
c 
c 
c c 
c
c c c ,GGc 
c  c c c  
c  c ,GG,GGc
c c c 

c 
c -
c c c
c c 
c c c c /Gc c c  
c  c
/GG"GGGcc4,GG,GG/G6c.c
c-
c cc\$ C"cccc\$ cc

c

c c c operación costosac 
c 

c c

c 
c c c
c c
c 
c c

 
"c
c
c
c
cc
c 
cc

c
c

cccc.c 
c
.c
c c
 c\$ c-cc

c
c cc
"cc
SELECT *
c
c
 c c
c
c
c §
c
c
c

FROM Representantes, Pedidos

Where Representante.numemp = Pedidos.rep c
c
(
c 2
c c \$ c c 
 c c c .c c c c 
 c c
2
c c c c  c c c 
c  
c unac c c columnas de
emparejamientocc cíndicec 
cccc c

c
c c

ccINNER
JOIN"c
El INNER JOINcc
&c INNER JOINc c

c 
c c 

c c c c emparejar filasc c c
c c 
c más eficientec \$ c 
c c 

c 
c cuandoc c c c columnas de
emparejamientoc c indexada"c ?c \$ c c c c -c c 

c 
c 

c .c  
c

ccc\$ c cc
 c c2
cc cc c c ccc
busca directamenteccc
cclas filas quec cc
 c
c
c cse emparejanc
c
cc\$ c 
cccc 
"c
!cccc  cc

c
&2
c
SELECT *
FROM pedidos INNER JOIN clientes ON pedidos.clie = clientes.numcliec
*,c .c /c 
c especificaciones de tablac 4
c c c 
c c
c 
c 
c c

 c    6c c c c  .
c 
c c c c 
"c   c c c
c c misma
tablaccc
ccobligatorioc cc
c caliasc c"c
#
,c
/c
cccolumnas de emparejamiento"cc
+c \$ c 
c c c   c ONc 
c 
c c columnac c c nombres
c ccc.c c 
6"cc
!c columnasc c emparejamientoc c 
c c misma clase de datosc c
c c 
c

c c 
c -c "c 
c 
c  8
c c c c 
c "c 
c 2
c c   c

c 
c % 
( 8
c .c !
c  
c \$ c 
c 
c c c 
c 
c c   c

c
c c
cc.c)
"c% cc
 c
c  cc c
c 
cc+!&"c
Compcc \$ c

c ccomparaciónc4c;cHcIcH;cI;c
cHIc6c.cc cc
cc
 c c2
"c
c   c c varias condicionesc c 2
c unidasc 
c 
c

c ANDc .c ORc


c c
 ccparéntesis"c&2
c
SELECT *
FROM pedidos INNER JOIN productos ON (pedidos.fab = productos.idfab) AND (pedidos.producto =
productos.idproducto)c
c  ccombinar másc cdos tablas, cc
c-.c\$ csustituircccc ctablac

c cINNER JOIN completo"cc

c2
c
SELECT *
FROM (pedidos INNER JOIN clientes ON pedidos.clie = clientes.numclie) INNER JOIN empleados ON
&cc c,c-
c
c c3((&c +3(c

c8c

c c
SELECT *
FROM clientes INNER JOIN (pedidos INNER JOIN empleados ON pedidos.rep = empleados.numemp)
ON pedidos.clie = clientes.numcliec
&cc
c-
c  
c/c
c c3((&c +3(c

"cc

c
c
 c c
c
c
c
c
c
c

El LEFT JOIN y RIGHT JOINc

&c LEFT JOINc .c RIGHT JOINc 
c

c 
c c 

c c c 8c 
 c
composición externa"c
c cc cINNER JOIN"cc
!c 


c c -c -
c 4c producto cartesianoc .c c INNER JOIN6c 
c
composiciones internasc.c\$ c

c
c
c ccc c 
c
c
c\$ cccc
c\$ cc
"c
#
c c

cc
cc
ccc\$ ccc
c cc cc
c
c\$ c cc
 c
c c2
c

c 
c 
c 
c 
c c
c c c c   c c c
c
 c
2c c
cc 
c c

c
c
 c
+c\$ c-
c 
cc
c c
 c
c.c\$ cc
ccc
c
cc cc:+ "c
#
c c c 
c empleadosc \$ c no tienenc c oficinac  c 4 c 
c  
c c c

c
c c c c 
6c no aparecen en el resultadoc .c \$ c c 
 c
c
"c
c 
ccINNER JOIN c
(
c c 
c 
c 
c 
c \$ c c c 
c  
c c c 
c
c 
c
ccc 
"c
 cc
c
cc\$ c queremosc\$ ctambién aparezcanccfilas que no tienen una fila
coincidenteccc
ccutilizaremosccLEFTc
cRIGHT JOIN"c
!cc cLEFT JOINccc  cc

c
!c c c c c c c mismac \$ c c c INNER JOINc 
c 7
c \$ c c c c
cINNERc
cLEFTc4izquierdacc86"cc
cc &c
c 
c c añadir al resultadoc c INNER JOINc c filasc c c tablac c c
izquierdac\$ cno tienen correspondenciaccc
cc.crellenarcccc
ccamposc cc
tablac ccderechac
cvalores nulos"c
&2
c
SELECT *
#
cc2
c
c

c cc c
c
c
c
c 
c c c
c.c
c

c\$ c
cc
c cc
c c 
c
c.c
c 
c c c
c
c 
"c
c

c
c
 c c
c
c
c X
c
c
c

!cc cRIGHT JOINccc  c

c

c
!cc c cc \$ c c c INNER JOINc 
c 7
c \$ c c c cc INNERc
c
RIGHTc4derechacc86"cc
cc &c
c 
c c añadir al resultadoc c INNER JOINc c filasc c c tablac c c
derechac \$ c no tienen correspondenciac c c
c c.c rellenarc c c c 
c camposc c c
tablac ccizquierdac
cvalores nulos"c
&2
c
SELECT *
#
c c 2
c 
c

c c c c 
c 
c 
c 
c 
c c  c
c .c
 cc cc
c c
c\$ c
cc cc7c
c
c
c 
c c

cc 
"c
'c
 LEFTc JOIN oc RIGHT JOINc se puede anidarc 
c c c
c INNERc
JOINc 
c c
c INNER JOINc 
c c  c anidarc dentroc c LEFTc JOINc
c RIGHT JOIN"c !
c
 
c cJOINc c c c
c 
cccc  c c
 cc\$ c



c c c c 
c 
c 
c 2
c c 
c .c c 
c c c  
c c c

 c ccc4c.c
c
c c
cJOIN6c 
c cc  cFROM"c

c2
c

c c
SELECT *
FROM clientes INNER JOIN (empleados LEFT JOIN oficinas ON empleados.oficina = oficinas.oficina)
#

c
c
c
cc
c
c 
c cc
c c c
c.c
 
c C 
c 
c c c  c c c

c 
c c \$ c c c
c
c.c
c 
c cc
c cc
"c
c - 8
c  
c INNERc c c cLEFTc 
c c 
c c c 
c 
c \$ c 
c
c
c.c
c
c
cccc 
c cLEFT JOINc.c
c
c
cccc 
c
cINNER JOINc
c"c
Resumen de cuándo utilizar cada operación.c
ccc c
c\$ 8c
c c
cc c cc
 cc c
c
\$ c c\$ 8c ccc\$ c-c.c7cc c\$ 8c
c "c
c  c -
c 
c *,c .c */c c c c c \$ c \$ 
c c 
c 
c .c c c
c c \$ c c c  
c c 
 "c *,c .c */c 
c c c    c
c

 "c
&cc7cc 
cc c<&c*,c-.cc\$ c
cc2cc*/<cc c
c c cc

c<c c ccc-.cc\$ c
cc2<"c
cc

c
c
 c c
c
c
c 
c
c
c

c


c\$ c\$ 
c
 cc
 c9&
cc
c.cc  c c

c
c
c\$ cc c8
cc c  >c&c !c
cc  cc c
c
FROM Cliente INNER JOIN Préstamo ON Cliente.Rut = Préstamo.Rut;

+8c\$ c !c cc

c
="
= 
cccJ  cc

c
cc
c\$ c c 
cccc\$ c cc c c"c


c-c
c#"#  =#ccc c#  =#ccc  c"cc

c  
c \$ c c  
c #  =#c c c 
c c c c c c 
c \$ c c

ccc  c:
c
c-.cJ  ccc#  =#"c
%
c c 
 c 
c .c 
 
c c 
c 
c c 

c c c \$ c c
\$ c 8c \$ c 

c 
c c c c 8
c c c   c . "c 9&
c c

c .c c   c c c 

c 
c c \$ c c c 8
c c c   c . >"c c
c c 
 c 
c c
c c c c   c 5-c 

c 
c c


c
cAnd.

FROM Cliente INNER JOIN Préstamo ON Cliente.Rut = Préstamo.Rut
WHERE Nombre_Sucursal = "Perryridge";
cc
c c

c
c
 c c
c
c
c `
c
c
c

!c c
c

c
cAnd, Orc.cNotccc c
c

c
cù, y .
!c  .c c

c c 
c Between c c   c 5-c \$ c
c\$ c c
c\$ cc
c
c c\$ c c
c 
c.c.
c
c c\$ c

c
c 
"c
c\$ 
c
cc7
c c c cc c
c
ccKG"GGGc.c,GG"GGGc

c
cc
cLcc c
c
cc c SELECT Número_Cuenta
FROM Depósito
WHERE Saldo Between 80.000 And 100.000
c
&cc c
c
SELECT Número_Cuenta
FROM Depósito
WHERE Saldo >= 80000 and Saldo <=100000

Operaciones de Conjuntos

!c  .c c


c Unión 4'6c Intersect 436c .c Minus 4)6c \$ c

c
c
"c
c
&2
c&
cc

c
cc\$ cc c ccc  c9. >"cc
c
SELECT DISTINCT Cliente.Rut, Nombre_Cliente
FROM Depósito INNER JOIN Cliente ON Depósito.Rut = Cliente.Rut
WHERE Nombre_Sucursal = "Perryridge"

c %c
 c
cc

c
cc\$ cc c8
ccc  c9. >"c
c
SELECT DISTINCT Cliente.Rut, Nombre_Cliente
FROM Préstamo INNER JOIN Cliente ON Préstamo.Rut = Cliente.Rut
WHERE Nombre_Sucursal = "Perryridge";
c
c c
cc

c
cc\$ cc c8
c c c
c
c
ccc  c
9. >c
 c
c
SELECT DISTINCT Cliente.Rut, Nombre_Cliente
FROM Préstamo INNER JOIN Cliente ON Préstamo.Rut = Cliente.Rut
WHERE Nombre_Sucursal = "Perryridge"
UNION
SELECT DISTINCT Cliente.Rut, Nombre_Cliente
FROM Depósito INNER JOIN Cliente ON Depósito.Rut = Cliente.Rut
WHERE Nombre_Sucursal = "Perryridge";
c
c )cccc
cc

c
cc\$ cc c8
c.c c cc
c  c9. >c
 c
c
SELECT DISTINCT Cliente.Rut, Nombre_Cliente
FROM Préstamo INNER JOIN Cliente ON Préstamo.Rut = Cliente.Rut
WHERE Nombre_Sucursal = "Perryridge"
INTERSECT
SELECT DISTINCT Cliente.Rut, Nombre_Cliente
FROM Depósito INNER JOIN Cliente ON Depósito.Rut = Cliente.Rut
WHERE Nombre_Sucursal = "Perryridge";
c
c
c
c c

c
c
 c c
c
c
c ``
c
c
c

c c
cc

c
cc cc  c9. >c\$ cc c cc
c
c
c8
c
 c
c
SELECT DISTINCT Cliente.Rut, Nombre_Cliente
FROM Préstamo INNER JOIN Cliente ON Préstamo.Rut = Cliente.Rut
WHERE Nombre_Sucursal = "Perryridge"
MINUS
SELECT DISTINCT Cliente.Rut, Nombre_Cliente
FROM Depósito INNER JOIN Cliente ON Depósito.Rut = Cliente.Rut
WHERE Nombre_Sucursal = "Perryridge";
c
c % \$ cc
c'ccc c !c c c%(3c
c

c
cc

"c
!c

c 3c .c  c c c c  !c
c 4\$ 6c 
c 
c c   c c c
 "c
c &c
cccc

c 
c
cc c !c c c%(3"c

Pertenencia a un Conjunto

!c c c c 8c  

c 
c c

c \$ c c 
c c c c
 cc c"c
&c 

c INc  c c c c 
c c c 
2 
c
 c c 
2 
c c c 
c c

c

c
c c  c"c&c

cNOT INc cc
ccc
2 
"c
c  
c 
 8c c  
c c 
 c 9&
c c 

c 
c c \$ c c c
8
c.c c ccc  c. >"c%
cc
c -c
 c cc
3cc c
c
2 
 c&c
2 
c c
cc
c c 
ccc  c. c.cc

2 
c c 
c c 
c c 8
c c c   c 9. >"c 

c 
c c 
\$ c

c c
cc

c
cc\$ cc c ccc  c9. >c\$ c
c

c c 
2 
c c 
c c 
c 8
c c c   c 9. >"c #c 
c
c
c
c 
c\$ cc
c
ccccc
 c 
cc

cINc c
!"c&
c

cc

c
cc\$ cc c.c
cc 
 "c
c
SELECT DISTINCT Cliente.Rut, Nombre_Cliente
FROM Depósito INNER JOIN Cliente ON Depósito.Rut = Cliente.Rut
WHERE Nombre_Sucursal = "Perryridge";
c
) 8c 
c 
cc 
c c 
c 8
c c c   c c 9. >c.c \$ c
c c c c c c \$ c c  c
 c c c  
 "c c 0#
c 
c



cc 
 cc ccc
"c!c
 c c c
c
SELECT DISTINCT Cliente.Rut, Nombre_Cliente
FROM Depósito INNER JOIN Cliente ON Depósito.Rut = Cliente.Rut
WHERE Nombre_Sucursal = "Perryridge"
and Cliente.Rut in (SELECT Cliente.Rut
FROM Préstamo INNER JOIN Cliente ON Cliente.Rut = Préstamo.Rut
WHERE Nombre_Sucursal = "Perryridge");
c
&c2
c c\$ cc
cccc
 c cc
cc !"c&
cc

c .c \$ c c c c  
c c c 
 c c c 
c \$ c c c  "c
A
c\$ cc !cc-.c c  c
c c  "c
c %-
c  
c c 
c c c 
 c NOT IN"c c 
c c 

c 
c c c \$ c
c c  c c c c   c . c 
c 
c c c 8
c c c   c . c


c c
c
SELECT DISTINCT Cliente.Rut, Nombre_Cliente
FROM Depósito INNER JOIN Cliente ON Depósito.Rut = Cliente.Rut
WHERE Nombre_Sucursal = "Perryridge"
and Cliente.Rut not in (SELECT Cliente.Rut
FROM Préstamo INNER JOIN Cliente ON Cliente.Rut = Préstamo.Rut
WHERE Nombre_Sucursal = "Perryridge");

c
c
 c c
c
c
c `º
c
c
c

Variables de Tuplas

c  !c 
c  c c 
c c c c  c c  
c 
c c  "c 'c
c c cc !c cc
 c
c cc  "c!cc c cc
ccc  c:
"cc 
c

cccc
 c9
cc
c.cc
  c c

c
cc\$ cc c8
cc c  >c c
c
FROM Préstamo AS S, Cliente AS T
WHERE S.Rut = T.Rut;

(c\$ c cc c cc ccc  c:+ c



c  8c c
c
ccc
cc cc
 c c
c 
c
cc
"c
!c c c  c
c .c 7c c 
c
c  c c cc"c &c c

ccc
c cc
c
"c c\$ c\$ 
c
cc

c
c
c\$ ccccc  c\$ ccc#-c% "c&
cc
 c

c
  c
c
FROM Cliente AS s, Cliente AS t
c
c +8c\$ c
c

c cc
c#"#  =#c 
c\$ c
cc
c
 ccccc#c\$ cc\$ c-"cc
c
% 
c\$ c c
c
cccc
 c c
c
FROM Cliente
FROM Cliente
c
c
Comparación de Conjuntos

: c 
c c c 
 c INc c c c 
 c 
c 
\$ c  
c 

c c
   c c
c 
c c   "c #
 c c 
 c 9&
c 
c 
c c 
c c
  c\$ cc c
c.
c\$ c c  c  cc "cc
c
SELECT DISTINCT t.Nombre_Sucursal
FROM Sucursal AS t, Sucursal AS s
WHERE t.Activo > s.Activo and s.Ciudad_Sucursal = "Rancagua";
c
 
c \$ c 8c c c 
c 9.
c \$ >c 
c 

c c c c 
c c

 cIN.c
!cc
c
c c
c
cccc
 c
"c!cc9Mayor
que algún>cccc !c
c´> someµ"c&c
 c
ccccc
 c c
c
c\$ ccccc c
 c cc
 ccC
"c
c
c
SELECT Nombre_Sucursal
FROM Sucursal
WHERE Activo >Some (SELECT Activo
FROM Sucursal
c
!c 
 c c
c
Select Activo
From Sucursal
c
c c

c
c
 c c
c
c
c `è
c
c
c

c c 
2 
c c 

c 
c 
c c 
c 
c c c   c c  "c !c

c> someccc  c5-c cc
cc  ccc
c
c cc c
c .
c \$ c c 
c c 
c c 
2 
c c 

c 
c 
c c 
c c c   c c
 "c
!c 8c c c 

c Menor alguno (< some), Menor igual alguno (<=
some), Mayor igual alguno (>= some), Igual alguno (= some) y distinto algunoc (<> some).c #

c
2
c\$ c\$ c=somecc 8ccIN"c
%-
c
\$ 
ccc
 "c&
c
c
c c
cc  cc\$ cc
cc cc
cc.
c\$ c
cc  c c "c!c
 c> ALLc

 ccc
c9Mayor que todos>"c'
cc
 c
cc
 c

c  c
c
SELECT Nombre_Sucursal
FROM Sucursal
WHERE Activo>all (SELECT Activo
FROM Sucursal
c
#

ccc
c csome,c !ccc

c<ALL, <=ALL, >=ALL, =ALL, <>ALL.

!c .c ccc

cc c 
 cc c cc c 
"c
!c
 cEXISTSc  cc
c ccc 
 cc c 
c
cc"c'
cc

 cexists,c

ccc
 c9&
cc

c
cc\$ cc c c.c
c8
ccc  c. >"c*
c c
c
 c
c
SELECT Nombre_Cliente
FROM Cliente
WHERE EXISTS (SELECT *
FROM Depósito
WHERE Depósito.Rut = Cliente.Rut
and Nombre_Sucursal = "Perryridge")
and EXISTS (SELECT *
FROM Préstamo
WHERE Préstamo.Rut = Cliente.Rut
and Nombre_Sucursal = "Perryridge");

!cc 
 cExistsc ccccc c ccc  c. "c!c
  c 
 cExistsc ccccc c8
c cc  c. "c
!c 
c c c  c c c  
 c   c 
c 
c c 
 c NOT
EXISTS"c A

c c c 
 c 
c 

c c 9&
c c 

c 
c c c c
  c. c\$ cc c cc
c
c c8
>"c#

c  c
c
SELECT Nombre_Cliente
FROM Cliente
WHERE EXISTS (SELECT *
FROM Depósito
WHERE Depósito.Rut = Cliente.Rut
and Nombre_Sucursal = "Perryridge")
and not EXISTS (SELECT *
FROM Préstamo
WHERE Préstamo.Rut = Cliente.Rut
and Nombre_Sucursal = "Perryridge");
c
c

c
c
 c c
c
c
c `]
c
c
c

Ordenación de la Presentación de Tuplas

c  !c
cc
c  
c
c

c
cc
 ccc\$ cccccc cc
c"c!c  c9Order By>c-c\$ cc ccc 
c c c
 ccc
c
 c 
"c c c c
 c8
c 

c 
c c \$ c c c 8
cc c
  c. c
 c
c
SELECT DISTINCT Cliente.Rut, Nombre_Cliente
FROM Depósito INNER JOIN Cliente ON Depósito.Rut = Cliente.Rut
WHERE Nombre_Sucursal = "Perryridge";
ORDER BY Nombre_Cliente;

c 
c
c !c c
c
cc
 c "cccc
c c
 c


c c Descc c
 c  c
c Ascc c
 c  "c % c c
 c
  c c 
c 7c  
"c  c \$ c \$ 
c c c c 8
c

c c c
 c  c c   "c c 
c 8
c c c c   c c 
c

 
cc
 c c
c7
c c8
"c&
c
cc !c

c  c
c
SELECT *
FROM Préstamo
ORDER BY Cantidad DESC , Número_Préstamo;
c
c cc c
 c c+ c.c !c cc c
 "c 
c\$ c
 c
cc7
c c c  cc


c
cc
cc
 c 
cc
"c
ccc 
c

c
cc
cc
c7
c cc
c\$ c
cc cccccc
 
cc
c c c
c
c
c c  c+ c.c 
ccc9Top
N>"c&2
c&
cc1c  c\$ c
cc
c.
"c
c
SELECT TOP 3 Nombre_Sucursal, Activo
FROM Sucursal
ORDER BY Activo;
c
c c
c .cc  c+ c.cc 
c cc
 c 
c c
2 
c

c c
1c
c ccc  c\$ c cc  c5-"c
c
c
&c 
c
c
ccc
c "c&cc2
c
ccc
c c
c
c
1c.cMc
c cc
 c 
cMc
"c
c *8c   c c cc  c c c 
c c 
c
2c
c 
c \$ c c  c c c c  
c c 
c c c 
c 
c c c
  c + c ."c  
c \$ c c  c c c 1c   c 
c .
c 
c c c ,Gc Nc c c
  c
c.
c
cc
 c c
c
ccccccccccc SELECT TOP 10 PERCENT Nombre_Sucursal, Activo
FROM Sucursal
ORDER BY Activo;
c

c c

c
c
 c c
c
c
c `ë
c
c
c

Funciones de Agregación

c  !c
cc
  c c c 
cc 
c c c 
cc  c9
c.>"c
&c  
c
c  
c 
c c c   c 
c .c c c c 
c  
"c !c  c 
c c

c 
c c 

c 
c  
c c c   c 
c .c c c 

c c c  
"c  !c  .c
 
cc  c
c
Promedio : Avg
Mínimo : Min
Máximo : Max
Total : Sum
Contar : Count
cc
c !c

c 
c c %c c c  
c c c 
\$ c
c 
c  
c c
 "c &c  
c c c  c c c c c 
c 7
"c c  
c 
 c c

 c 9&
c c 
c 
 
c c c  c c 
c c   >"c &
c 
c 

c
  c
c
SELECT Nombre_Sucursal, AVG(Saldo) AS [Promedio de Saldos]
FROM Depósito
GROUP BY Nombre_Sucursal

c %c c c 7c c c 

 c \$ c c c c 
c  
c c \$ c c c  "c 
c
2
c 

c c 
c 7c c   c c c \$ c c 
c 
 
c c c
 cc.
c\$ cOG"GGG"c&c
 c
cccc c7c "c ccccc c
 
c 
 
c c c   c c Group By"c c c c 
 c c c
c 
c c
  c´Having>c cSQL. !
c 
c cc  c0cccc  8c cc
c c
 
c 
c 
c \$ c   c c  
c c "c &
c c 
 c c  !c 

c
  c
c
SELECT Nombre_Sucursal, AVG(Saldo) AS [Promedio de Saldos]
FROM Depósito
GROUP BY Nombre_Sucursal
HAVING AVG(Saldo) > 70000

c #

c

c2
c c 
c c 
c c
Fc
 cc
 c9&
c\$ c
  c 
c c
c
 
c.
>"c !c  
c c 
c 
c   c 

c cSQL.
c \$ c  \$ c 
c c c c 4%4"""66c 
c c  "c &c 
c  c
cc
c\$ c  ccc\$ ccc
 
cc.
c
c c\$ c

c

cc
 
"c
c
c
SELECT Nombre_Sucursal
FROM Depósito
GROUP BY Nombre_Sucursal
HAVING Avg(Saldo) >=All (Select avg(saldo)
From Depósito
Group By Nombre_Sucursal)

c %cc 
cccc
c

c c 
c7
"c&cc
c
c 
cc
  c
c."c#
 cc
 c9&
cc
c
 
cc
cc >"c&
c

c

c  c
c
SELECT avg(saldo) AS [Promedio de Depósitos]
FROM Depósito
c
c c
c !c c cc#
cc c cc
cc7
c c cc c
"c !c 
c c 
c c  !c c 
4E6"c %c c 
c c 7
c c  c c c
cc
 c
c
SELECT count(*) AS [Número de Clientes]
FROM Cliente

c c

c
c
 c c
c
c
c `§
c
c
c

cccc
 cc c  cL-c.c c  c0c
cccc
 
c cc
 cL-"c!c c\$ ccc 
cL-c
c

 cc 
c

cc  c
c."c) 8cccc  c0ccc c 
"c!
c 
c\$ cc
c 
c cc  c0c
c 
c
cc  cccc c c 
c
c c   "c c 
c -.c   c 0c c 
2 
c 

c c  c \$ c c c   c
L-cccc

c c 
c7
"cc cc 
c c c  cL-c.c c  c0c
c c c 
 c 
 c c 
 c 9c &
c c 
c 
 
c c 

c 
c c 
c

c\$ cccc:
c.cc
c
c
c/c >"c
c
SELECT DISTINCT Cliente.Nombre_Cliente, Avg (Saldo) AS [Saldo Promedio]
FROM Depósito INNER JOIN Cliente ON Depósito.Rut = Cliente.Rut
GROUP BY Cliente.Nombre_Cliente
HAVING Count (Número_Cuenta) >= 2;
c
c !c  c Sumc 
c 
c 
c c c 
"c 
c 2
c 
c c c  c Sumc
c cc
cc 
c c8
c 
c
cc  c9. >"c
c
SELECT DISTINCT Nombre_Sucursal, Sum(Cantidad) AS [Total préstamo]
FROM Préstamo
WHERE Nombre_Sucursal = "Perryridge"
GROUP BY Nombre_Sucursal;
c
c   c c cc 
cMinc.cMaxcc c
c
c.
c.c
c c
c
c
ccc
c
c 
c
"c&2
c cc8
c.
c
 
c
c c  "c
c
SELECT Préstamo.Nombre_Sucursal, Max(Cantidad) AS [Préstamo Mayor]
FROM Préstamo
GROUP BY Préstamo.Nombre_Sucursal;
c c

c   c cc

c!Pcc
c
cc c
c\$ c
 c
cc

c
\$ cc"cc

c  ccc
c

4
c2
c!Pc9>6c
c  c
cc

cc
c c
c c
c4
c2
c!Pc9E>6"c
c &c c c   c c c

c Likec c 
c c 
c c 
c 
c c
c c "c
c2
cc
c!Pc9#E>cc c
 c !cc
 c  c

c

c
cc c
c\$ cc
ccc#"c
c &c  c 2
c  c 
c 
c \$ c c 
c c c c  
c c  \$ c cc
c%c.c:cc.c1c7
"c
c
ccccccccccccLike ´P[A-F]###µ
c
c !cc c c
c  c ccc

c!Pcc
c
c
c c8

c

"

*
c c#
 c

c #
 c (
c#
 c
(Devuelve True) (Devuelve False)
Múltiples Caracteres a*a aa, aBa, aBBBa #c
EEc %%cQcc cc
Ec  cc #cc
Carácter Especial RESc a*a c
Un único carácter a?a aaa, a3a, aBa c
Un único numero a#a a0a, a1a, a2a c,Gc
Intervalo de RTSc f, p, g /cUc
caracteres
Fuera de un RVTSc WcUcNc cc
intervalo
Distinto de número RVGTWSc A, a, &, \$ Gc,cWc
Combinado a[!b-m] # An9, az0, a99 c2Gc

&2
c+cc  c.cccc\$ ccc"c"c
c
SELECT DISTINCT Cliente.*
FROM Cliente
WHERE Nombre_Cliente Like "*Silva*";

c
c
 c c
c
c
c `
c
c
c

Modificación de la Base de Datos

c
c 0c -
c -
c 
c  c c c c c c 
c c c c c

"c%-
c

c

cC cc
cc
c 
c !"c
c
c
Eliminación:

c c 'c 
 c c c c c c c c c 
c \$ c c 
 "c


c  c 
c  c 
 c 
c 

c  c 
c 
c c  
c

"c&c !c c ccc
c 
c  c
c
Delete r
From p
c
c )
c 
c2
c c
 c c cc ! c
c
,"c  c

c
c
c c c cc .
c cc,,"1MX",/1T/"c
c
DELETE *
FROM Depósito
WHERE Rut = "11.345.123-2"

/"c  c

c
c
c
c7
c c
ccXGGGc.cYGGG"c
c
DELETE *
FROM Préstamo
WHERE Número_Préstamo Between 5000 and 6000c
c
c
1"c  c
cc ccc  c  cc "c
c
DELETE *
FROM Depósito
WHERE Nombre_Sucursal in (Select Nombre_Sucursal
From Sucursal
c

c
c
 c c
c
c
c `X
c
c
c

Inserción:

c c c 
c c c c 
c c  c \$ c cc c c
c 
c
c
 c .
c 
cc c
2 
c c c\$ cccc"c+c
c
c c
 
ccc c cc cc
c c

c c
c 
"c%
c
c cc c cccc7
c

c c 
"c
!ccInsert ccc c
 ccc c "cc
cc\$ c\$ 
ccc--
c c\$ ccc .
c cc9,,"1MX",/1T/>cc
Z,/G"GGGccc cWO1/ccc  c!c#
 "c&
c
c
INSERT INTO Depósito
VALUES ("11.345.123-2", "Las Condes", 9732, 120000);
c
c &c c 2
c 
c 
c 
c c c c c
 c c \$ c c c 
c  
c


 ccc\$ c cc"cc
c c
c  
c\$ c
c  c
 cc

 c c 
c  
c  !c c c 
c  
c 

c c c c c 3"c !c
 c
cc3cc !c 8cc ccc
"c
c
INSERT INTO Depósito ( Nombre_Sucursal, Número_Cuenta, Rut, Saldo )
VALUES ("Perryridge", 9732, "11.345.123-2", 120000)

INSERT INTO Depósito (Número_Cuenta, Rut, Nombre_Sucursal, Saldo)

VALUES (9732, "11.345.123-2", "Perryridge", 120000)

c )c 
c c c 

c \$ c c  c  c c c  
c c c

 "c  c \$ c \$ 
c 


c c 

c 
c c 
c 8
c c c   c
. c c  c c -

c c Z/"GGG"c &c 7
c c 8
c c 

c 7
c c  c
cc c c c-

c
 c
c
INSERT INTO Depósito
&!&#*c(
=  c%c(
=  c(7
=8
c%c(7
=# c c%c
 c/GGGc%c
c
FROM Préstamo
WHERE Nombre_Sucursal = "Perryridge";
c
c &cc cc c c

c-
c
c 
c cccc
c
2 
c c "c# c ccc(
=  4. 6c c(7
=
4\$ cc


c7
c c ccc c 6cc
c cc c8
cc\$ cccc cc
 c c.cc
cc cc c c/GGG"c
c

Actualizaciones:
c
c
c c ccc&cc 
c

c ccc
cc c ccc

c

c
ccc "ccc

c  c cccUpdatec

ccc
c c3c
.c)"c

ccc c\$ cccc c 
c c
 "c c\$ ccc
-
c
c c8c.c\$ c

c
c
ccccc cXN"c&
c
c
' c)
c
Set Saldo = Saldo * 1.05
c

c
c
 c c
c
c
c `
c
c
c

Definición de Datos:
c
c c c &c c .
c c c  c 
c c c  !c .c c c )
c

c -
c  
c \$ c c 
c c c 
2 
c c 
"c 
c  
c c 
2 
c c

cc cc c)
c cc
ccc
c 
c c c! 2c c)c
c)
c4))!6"c
c &c !c))!c


c
 cc c\$ c c
cc
cc
 c .c
c \$ c c "c 'c c c  !c c c 
c c
 c ´Create
Tableµ.
c
Create Table r (A1D1, A2D2,.........AnDn)
c
c )
 c c c c 
c c c c  c Aic c c 
c c c  
c c \$ c c c
c c .c Dic c c 
c c 
c c 
c 
c c c

c c  
c %"c !c
 c #c *c
8c .c

cccc
cc c  "c
c 'c c 8c  c c c "c !c
 c 3c   c c c c

ccc"c
&2
 c
c
Èc Tabla Cliente
#c*c#c
4 c#-4,/6c
c c
(
=#c#-41G6c
c cc
#c#-c41G6c
c c
#  =#c#-c41G6c
c c
#
c#c.c[.4 66c
c
Èc Tabla Sucursal
#c*c  c
4(
=  c#-41G6c
c c
#  =  c#-41G6c
c c
%
c3c
#
c c.c[.c4(
=  66c

Èc Tabla Depósito
#c*c)
c
4 c#-4,/6c
c c
(
=  c#-41G6c
c c
(7
=# c3c

c3c
#
c)c.c[.c4 c(
=  c(7
=# 6c
#
c# c:
c[.c4 6cc#4 6c
#
c# c:
c[.c4(
=  6cc  4(
=  66c
c
Èc Tabla Préstamo
#c*c8
c
4 c#-4,/6c
c c
(
=  c#-41G6c
c c
(7
=8
c3c
#  c3c
#
c)c.c[.c4 c(
=  c(7
=8
6c
#
c#c:
c[.c4 6cc#4 6c
#
c# c:
c[.c4(
=  6cc  4(
=  66c

c c

c
c
 c c
c
c
c º
c
c
c

PRACTICO 1
c
oc #

cc c)cc !c&A&c

c
)&*+c
,/c % 
cc3
c #c&c %c  c
/Mc :c.c c & c cc
c
#%&%c
Código Nombre Código_Depto
,//Mc% c ,/c
,1,1c:c /Mc
,MGKc c /Mc
/G,Gc3"c&2"cc#
cc3
c ,/c
/W/Oc% 
c ,/c
c
%3(%*'%c
Código Nombre Código_Carrera
,G/,/cc c)
c /G,Gc
,G/,1c# 
c3c /G,Gc
,G/,Mc% c /W/Oc
,G/,Xc# 
c33c ,//Mc
,G/,Yc:c3c ,1,1c
,G/,Oc:c33c ,MGKc
,G/,Kcc c)
c /W/Oc
c
+:&+c
Rut Nombre Código_Depto Oficina Status Sueldo
,/"1MX"YOKTWc 
c'
c c /Mc 1c
 c YGGGGGc
,/"1OO"YYYTYc %c  c ,/c ,c #
c

 c YMGGGGc
,/"M,1"1/KTWc Pc&
c ,/c /c #
c
T*c Y1GGGGc
WK"OYX"M1/T,c 5
c \$ c /Mc Mc
 c YWXGGGc
c #
c
)3#*%c
Código_Profesor Código_Asignatur Semestre Año
,/"1OO"YYYTYc a ,G/,/c,c G,DG1D/GGWc
,/"1OO"YYYTYc ,G/,Kc,c G,DG1D/GGWc
,/"M,1"1/KTWc ,G/,1c,c G,DG1D/GGWc
,/"M,1"1/KTWc ,G/,Xc,c G,DG1D/GGWc
c
c
c
c c
c
c
 c c
c
c
c º`
c
c
c


 cc c
 cc !cc
c
,"c !c
c
c c
c

c cc  c c<#c&<"c
/"c !cc
c c
cc c  c
ccc
c 
c/W/O"c
1"c !ccc\$ c cc  c c<#c&<"c
M"c +c c
c.c c c

c\$ ccc 
c c<:c.c <"c
X"c \ 8c

c cc c,G/,Kc]"c
Y"c +cc  ccc\$ ccc

c< 3!*+(c'!!+%c %%<"c
O"c !c 
c.c
c ccc\$ ccc 
c c<% 
cc3
<"c
K"c !cc c  cccc c<3"c&2"c&c#
"c&c3
<"c
W"c \%c\$ 8c  ccc c<:c3<]c
,G"c\%c\$ 8c  cccc c<% <]c
,,"c\

c .
c 
cccYGGGGGc.cYXGGGG]c
,/"cc

c\$ ccc c c
 c#
c
,1"c c% c cc
c%c  c
c
c c

c
c
 c c
c
c
c ºº
c
c
c

PRACTICO Nº 2

#

cc c)cc !c&A&c
c
#+(3)&&c!%c3'3&(*&c*%!% c
c
#!3&(*&c
,,"1MX",/1T/c #c^c 2ccc,W,cAcc  c
,,"MXY"/11T1c  c#\$ c 2ccc,W,cAcc  c
,/"1OO"YYYTYc
8cc Acc,/YOc c:
c
,/"KYX"/1MTMc cc c 
cOWXc #-c
,1",/1"1MXTMc  
c0 
c 
cOWXc #-c
,1"1MX"MXXTXc #-c Ac#c,/1Mc  c
% c
,M"/,1"1MMT,c c

.c #
cWGWGc #-c
c
'#'%!c
# c#
c #-c XGG"GGGc
!c#
 c c:
c 1OG"GGGc
_ c #-c MGG"GGGc
. c  c 1XG"GGGc
c#
c  c /GG"GGGc
c
)&+3*+c
Rut Nombre_Sucursal Número_Cuenta Saldo
,,"1MX",/1T/c !c#
 c ,/,/c WGG"GGGc
,,"1MX",/1T/c !c#
 c ,/,1c WGG"GGGc
,,"1MX",/1T/c !c#
 c ,/,Mc WGG"GGGc
,,"MXY"/11T1c . c MXYOc 1G"GGGc
,/"1OO"YYYTYc # c#
c XYOKc OG"GGGc
,/"1OO"YYYTYc # c#
c XYOWc WG"GGGc
,/"KYX"/1MTMc # c#
c ,,1/c WO"GGGc
,1",/1"1MXTMc # c#
c KWKWc OO"GGGc
,1"1MX"MXXTXc c#
c 1MXYc WK"GGGc
,M"/,1"1MMT,c . c ,/1Oc ,GG"GGGc
c
&*% +c
,,"1MX",/1T/c _ c XYOKc ,"GGG"GGGc
,/"1OO"YYYTYc _ c OKKWc /GG"GGGc
,1",/1"1MXTMc . c ,/1Oc 1"GGG"GGGc
,M"/,1"1MMT,c . c XYM,c MGG"GGGc
c
c
 c c
c
c
c ºè
c
c
c

c

 cc c
 cc !cc
c
,"c &
cc  c\$ cc c8
c
/"c &
cc
c.cc  c c

c
cc\$ cc8
c
1"c &
c c 
c .c c   c c 

c 
c c \$ c c c 8
c c c   c c
9. >c
M"c &
cc7
c c c cc c
c
ccKGGGGc.c,GGGGGc
X"c &
c

c
cc\$ cc c ccc  c c9. >c
Y"c &
c

c
cc\$ cc c8
ccc  c c9. >c
O"c &
c 

c 
c c \$ c c c 8
c c  c
c 
c
c c c   c c
9. >c
K"c &
c

c
cc\$ cc c8
c.c c ccc  c c9. >c
W"c &
cc

c
cc\$ cc c ccc  c c9. >c
c
cc c
8
ccc  c
,G"c&
cc
c.cc  c c

c
cc\$ cc c8
cc c  c
,,"c&
cc

c
cc\$ ccccc  c\$ ccc9#-c% >c
,/"c&
c 
c 
c c 
c c   c \$ c c c 
c .
c \$ c  c   c
  cc9 >c
,1"c&
c
c
c c
cc  c\$ cc c
c.
c\$ c
cc  c
c9 >c
,M"c&
cc

c
cc\$ cc c c.c c8
ccc c c9. >c
,X"c&
cc 

c 
c c c c  c c >. >c \$ c c c  c c
c 
c c
8
c
,Y"c!cc
 c8
c

c
cc\$ cc c8
ccc  c c9. >c
,O"c!c

c8
cc
 c) c.c% cccc7
c c8
c
,K"c&
cc1c  c\$ c
cc
c.
c
,W"c&
cc,GNc cc  c
c.
c
c
/G"c+cc  c.ccc\$ ccc"cc
/,"c!cc
c\$ cccccAccc

c
c
 c c
c
c
c º]