0
respostas

Faça como eu fiz: analisando o salário médio por departamento

SELECT tc.nome as NomeCliente, te.tipo as TipoEmprestimo, 
       te.valor as ValorEmprestimo, tp.DataPagamento , tp.valor as ValorPago
from TabelaClientes tc
inner join TabelaEmprestimo te on te.id_cliente = tc.id_cliente
inner join TabelaPagamentos tp on tp.id_emprestimo = tp.id_emprestimo;