Could you please guide
I have a scenario where credit_Date,debit_date and loan_date can have different values of date or same. Output table have below columns
Date: should combine credit_date, debit_date and loan_date ( credit_date, debit_date and loan_date can be same (or) have different dates)
Credit_payment: Find the sum of credit amount for a given credit_date, entity, currency, owner
Debit_payment: Find the sum of debit amount for a given debit_date, entity, currency, owner
Loan_payment: Find the sum of loan amount for a given loan_date, entity, currency, owner,
entity: values from Table1
currency : values from Table 1
Owner: values from Table 1
Total : sum of ( credit_payment + debit_payement+ loan_payment)