How to display data using 2 tables in sql
Are you looking for way to get a sql query to display data using 2 tables in sql ? then read this thread to know more about it
Hi all,
I have the 2 tables EmpLoans and EmpPayments, tables Data like below
EmpLoans
UserId LoanAmt
229 15000
229 3000
229 12500
EmpPayments
UserId Date LoanInstallment RemainingAmt
229 1/31/2013 1500 29000
229 2/28/2013 2500 26500
229 3/31/2013 3500 23000
229 4/30/2013 3000 20000
I want the data like below using sql query
UserId Date Sum(LoanAmt) LoanInstallment RemainingAmt
229 1/31/2013 30500 1500 29000
229 2/28/2013 30500 2500 26500
229 3/31/2013 30500 3500 23000
229 4/30/2013 30500 3000 20000
Can anybody help me the query display like above.
Thanks,