Advertisement
Rafael_Yuki

Untitled

Feb 29th, 2024
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CREATE OR REPLACE VIEW Emprestimos_Ativos AS
  2. SELECT
  3.     e.EmprestimoID,
  4.     u.Nome AS Nome_Usuario,
  5.     l.Titulo AS Titulo_Livro,
  6.     e.DataEmprestimo,
  7.     e.DataDevolucao
  8. FROM
  9.     Emprestimos e
  10. INNER JOIN
  11.     Usuarios u ON e.UsuarioID = u.UsuarioID
  12. INNER JOIN
  13.     Livros l ON e.LivroID = l.LivroID
  14. WHERE
  15.     e.DataDevolucao > CURRENT_DATE;
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement