TYPE=VIEW
query=select `v`.`Acc_no` AS `sv_acc`,`lc`.`acc_no` AS `loan_acc`,round(if((`lc`.`poloan` = \'\'),(sum(`v`.`cr`) - sum(`v`.`dr`)),((sum(`v`.`cr`) - sum(`v`.`dr`)) / (select count(0) from `co-operativebank-dekhaliannapurna`.`loan_acc` where (`lc`.`acc_no` = `co-operativebank-dekhaliannapurna`.`loan_acc`.`acc_no`) group by `lc`.`acc_no`))),0) AS `bal`,`lc`.`sub_head` AS `sub_head`,(select count(0) from `co-operativebank-dekhaliannapurna`.`loan_acc` where (`lc`.`acc_no` = `co-operativebank-dekhaliannapurna`.`loan_acc`.`acc_no`) group by `lc`.`acc_no`) AS `total_p` from `co-operativebank-dekhaliannapurna`.`voucher` `v` join `co-operativebank-dekhaliannapurna`.`loan_acc` `lc` where ((`lc`.`acc_no` = \'171231000002\') and (`lc`.`loan_against_sv_acc` = `v`.`Acc_no`) and (`lc`.`sub_head` = \'23113\') and (`v`.`sub_head` = \'14201\')) group by `lc`.`acc_no` order by `lc`.`date_open`
md5=0bf62acebe6b53b87f14a880f60dc0c8
updatable=0
algorithm=0
definer_user=admin
definer_host=localhost
suid=2
with_check_option=0
timestamp=2026-04-28 03:36:11
create-version=1
source=select v.acc_no as sv_acc,lc.acc_no as loan_acc,round(if(poloan=\'\',sum(cr)-sum(dr),(sum(cr)-sum(dr))/(select count(*) from loan_acc where lc.acc_no=acc_no group by lc.acc_no))) as bal,lc.sub_head,(select count(*) from loan_acc where lc.acc_no=acc_no group by lc.acc_no) as total_p from voucher v,loan_acc lc where lc.acc_no=\'171231000002\' and lc.loan_against_sv_acc=v.acc_no and lc.sub_head=\'23113\' and  v.sub_head=\'14201\'   group by lc.acc_no order by date_open
client_cs_name=utf8mb4
connection_cl_name=utf8mb4_general_ci
view_body_utf8=select `v`.`Acc_no` AS `sv_acc`,`lc`.`acc_no` AS `loan_acc`,round(if((`lc`.`poloan` = \'\'),(sum(`v`.`cr`) - sum(`v`.`dr`)),((sum(`v`.`cr`) - sum(`v`.`dr`)) / (select count(0) from `co-operativebank-dekhaliannapurna`.`loan_acc` where (`lc`.`acc_no` = `co-operativebank-dekhaliannapurna`.`loan_acc`.`acc_no`) group by `lc`.`acc_no`))),0) AS `bal`,`lc`.`sub_head` AS `sub_head`,(select count(0) from `co-operativebank-dekhaliannapurna`.`loan_acc` where (`lc`.`acc_no` = `co-operativebank-dekhaliannapurna`.`loan_acc`.`acc_no`) group by `lc`.`acc_no`) AS `total_p` from `co-operativebank-dekhaliannapurna`.`voucher` `v` join `co-operativebank-dekhaliannapurna`.`loan_acc` `lc` where ((`lc`.`acc_no` = \'171231000002\') and (`lc`.`loan_against_sv_acc` = `v`.`Acc_no`) and (`lc`.`sub_head` = \'23113\') and (`v`.`sub_head` = \'14201\')) group by `lc`.`acc_no` order by `lc`.`date_open`
