UNIVERSIDAD AUSTRAL DE CHILE
FACULTAD DE CIENCIAS ECONÓMICAS Y ADMINISTRATIVAS
                    AUDITORÍA




    Laboratorio


                   PROFESOR:
                  Cristian Salazar

                  INTEGRANTES:
               KATHERINE CHACÓN
             .Daniela Henríquez Uribe.

          VALDIVIA, 2 DE NOVIEMBRE 2012
Consultas
 select *
from carreras




select count(*)
from carreras
select *
from carreras
where id_carrera >3




select *
from carreras
where id_carrera <>3
select *
from carreras
where id_carrera =3




   a) Que entregue los libros que tengan editoriales extranjeras (NO Chilenas)
      (Titulo y año del libro).
b) Los prestamos que hasta el día de hoy, vencieron (Código del libro).




c) Los libros que faltan por entregar (Titulo y año)




d) El número de estudiantes que pertenecen a Comercial (Número)
TABLAS VISIO

      Empleados
                                                                       Proveedores
PK     Id_Empleado
                                                                  PK   Rut_Proveedor
       Nombre
       Apellidos                     Empresa                           Nombre
       Rut                                                             Telefono
                             PK      Id_Empresas                       Dirección
FK1    Id_Empresas                                                     Id_Venta
                                     Nombre
                                     Telefono
                                     Dirección
                                     Rut_Cliente
                             FK1     Rut_Proveedor                                              Compras
                                                                                         PK    Id_Compra
       Productos                                           Clientes                            Fecha_Compra
PK     Cod_Productos                                                                           Numero_Factura
                                                     PK    Rut_Clientes                        Cod_Categoria
       Nombre                                                                                  Rut_Proveedor
                                                           Nombre                        FK1   Rut_Clientes
       Id_Empresa                                          Apellidos
FK1    Id_Empresas                                         Telefono
                                                     FK1   Id_Empresas


                                                                                         Categoria
                                   Ventas
                                                                                   PK     Id_Categoria
                       PK         Id_Ventas
                                                                                          Nombre
                                  Fecha de venta                                          Id_Venta
                                  Numero Factura                                   FK1    Id_Ventas
                                  Rut Cliente
                       FK1        Rut_Clientes

Laboratorio 1

  • 1.
    UNIVERSIDAD AUSTRAL DECHILE FACULTAD DE CIENCIAS ECONÓMICAS Y ADMINISTRATIVAS AUDITORÍA Laboratorio PROFESOR: Cristian Salazar INTEGRANTES: KATHERINE CHACÓN .Daniela Henríquez Uribe. VALDIVIA, 2 DE NOVIEMBRE 2012
  • 2.
    Consultas select * fromcarreras select count(*) from carreras
  • 3.
    select * from carreras whereid_carrera >3 select * from carreras where id_carrera <>3
  • 4.
    select * from carreras whereid_carrera =3 a) Que entregue los libros que tengan editoriales extranjeras (NO Chilenas) (Titulo y año del libro).
  • 5.
    b) Los prestamosque hasta el día de hoy, vencieron (Código del libro). c) Los libros que faltan por entregar (Titulo y año) d) El número de estudiantes que pertenecen a Comercial (Número)
  • 6.
    TABLAS VISIO Empleados Proveedores PK Id_Empleado PK Rut_Proveedor Nombre Apellidos Empresa Nombre Rut Telefono PK Id_Empresas Dirección FK1 Id_Empresas Id_Venta Nombre Telefono Dirección Rut_Cliente FK1 Rut_Proveedor Compras PK Id_Compra Productos Clientes Fecha_Compra PK Cod_Productos Numero_Factura PK Rut_Clientes Cod_Categoria Nombre Rut_Proveedor Nombre FK1 Rut_Clientes Id_Empresa Apellidos FK1 Id_Empresas Telefono FK1 Id_Empresas Categoria Ventas PK Id_Categoria PK Id_Ventas Nombre Fecha de venta Id_Venta Numero Factura FK1 Id_Ventas Rut Cliente FK1 Rut_Clientes