SHARE
TWEET

lauputooo

a guest Sep 20th, 2019 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --ej17
  2. SELECT DISTINCT n.id_distribuidor,n.nro_inscripcion,n.id_distrib_mayorista
  3. FROM nacional n
  4. WHERE(n.id_distribuidor IN (
  5. SELECT e.id_distribuidor
  6. FROM pelicula p
  7. JOIN renglon_entrega r ON(p.codigo_pelicula = r.codigo_pelicula)
  8. JOIN entrega e ON(r.nro_entrega = e.nro_entrega)
  9. WHERE( (p.idioma = 'Farsi') AND (EXTRACT(year from e.fecha_entrega)=1998))
  10. ))
  11. --ej18
  12. SELECT p.*
  13. FROM pelicula p
  14. WHERE( p.codigo_pelicula NOT IN(
  15. SELECT r.codigo_pelicula
  16. FROM pelicula r
  17. JOIN renglon_entrega re ON(r.codigo_pelicula = re.codigo_pelicula)
  18. JOIN entrega e ON(re.nro_entrega = e.nro_entrega)
  19. JOIN distribuidor d ON(d.id_distribuidor = e.id_distribuidor)
  20. JOIN nacional n ON(n.id_distribuidor = d.id_distribuidor)))
  21. --ej19
  22. SELECT e.*
  23. FROM empleado e
  24. WHERE( e.id_empleado IN(
  25. SELECT r.id_empleado
  26. FROM empleado r
  27. JOIN departamento d ON(r.id_empleado = d.jefe_departamento)
  28. JOIN ciudad c ON(d.id_ciudad = c.id_ciudad)
  29. JOIN pais p ON(c.id_pais = p.id_pais)
  30. WHERE ((e.porc_comision>40) AND (p.nombre_pais='ARGENTINA'))))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top