SQL query for a specific scenario

if i have take two variables which has value ALedger and KLedger and third is date if ALedger and KLedger has same date do sum of base amount

Hi @Yogita_Gaikwad

Check out the XAML file

SumString.xaml (6.6 KB)

Output

Regards
Gokul

Hello @Yogita_Gaikwad

It would be better to explain your requirement with some sample data?

Thanks

@Yogita_Gaikwad Kindly share the Excel file, it will help us to provide better solution

Date | Base_Amount | Ledger | Status

22-01-2022 | 50 | ALedger |
23-01-2022 | 100 | ALedger |
24-01-2022 | 20 | ALedger |
25-01-2022 | 30 | ALedger |
22-01-2022 | 50 | KLedger |
23-01-2022 | 5000 | KLedger |
24-01-2022 | 20 | KLedger |
25-01-2022 200 | KLedger |

This is table in database and i want to do sum of Base_Amount if ALedger and KLedger of Ledger column Date is same and if sum 0 is then in status column set Reconciled otherwise set unreconciled if sum is other than 0(Zero)

Duplicate Topic: SQL query for a specific scenario - #3 by Rahul_Unnikrishnan

i want sql query for this