TYPE=VIEW
query=select `la`.`date_open` AS `date_open`,`la`.`acc_no` AS `acc_no`,`la`.`loan_against_sv_acc` AS `loan_against_sv_acc`,concat(`a`.`name`,\' [ \',`la`.`name_p`,\' ]\') AS `name`,`la`.`amt` AS `amt`,concat(`la`.`interest`) AS `interest`,max(`ld`.`Date`) AS `max_dt` from ((`co-operativebank-242`.`loan_acc` `la` join `co-operativebank-242`.`j_a` `a`) join `co-operativebank-242`.`loan_deposit` `ld`) where ((`la`.`loan_against_sv_acc` = `a`.`Acc_No`) and (`la`.`date_open` >= \'2017-12-05\') and (`ld`.`status` <> 0) and (`ld`.`Acc_No` = `la`.`acc_no`) and ((select max(`co-operativebank-242`.`loan_deposit`.`Date`) AS `max_dt` from `co-operativebank-242`.`loan_deposit` where ((`co-operativebank-242`.`loan_deposit`.`status` <> 0) and (`co-operativebank-242`.`loan_deposit`.`Acc_No` = `la`.`acc_no`) and (`co-operativebank-242`.`loan_deposit`.`Total_amt` <> 0) and (`co-operativebank-242`.`loan_deposit`.`Date` <= \'2017-09-30\'))) <= `la`.`fianl_date`) and (`la`.`sub_head` = \'23113\') and (`la`.`id` = `ld`.`loan_id`) and (`ld`.`Date` <= \'2017-09-30\')) group by `la`.`acc_no`
md5=3ea15818d27eb3012c236dc359defd8b
updatable=0
algorithm=0
definer_user=admin
definer_host=localhost
suid=1
with_check_option=0
timestamp=2025-09-15 05:24:50
create-version=1
source=select  `la`.`date_open`  AS  `date_open` ,\n `la`.`acc_no`  AS  `acc_no` ,\n `la`.`loan_against_sv_acc`  AS  `loan_against_sv_acc` ,\nconcat(  `a`.`name` ,  \' [ \',  `la`.`name_p` ,  \' ]\'  )  AS  `name` ,\n `la`.`amt`  AS  `amt` ,\nconcat(  `la`.`interest`  )  AS  `interest` ,\nmax(  `ld`.`Date`  )  AS  `max_dt`  from ( (  `co-operativebank-242`.`loan_acc`  `la`  join  `co-operativebank-242`.`j_a`  `a`  ) join  `co-operativebank-242`.`loan_deposit`  `ld`  ) where ( (  `la`.`loan_against_sv_acc`  =  `a`.`Acc_No`  ) and (  `la`.`date_open`  >=  \'2017-12-05\' ) and (  `ld`.`status`  <>0 ) and (  `ld`.`Acc_No`  =  `la`.`acc_no`  ) and ( (  select max(  `co-operativebank-242`.`loan_deposit`.`Date`  )  AS  `max_dt`  from  `co-operativebank-242`.`loan_deposit`  where ( (  `co-operativebank-242`.`loan_deposit`.`status`  <>0 ) and (  `co-operativebank-242`.`loan_deposit`.`Acc_No`  =  `la`.`acc_no`  ) and (  `co-operativebank-242`.`loan_deposit`.`Total_amt`  <>0 ) and (  `co-operativebank-242`.`loan_deposit`.`Date`  <=  \'2017-09-30\' ) ) ) <=  `la`.`fianl_date`  ) and (  `la`.`sub_head`  =  \'23113\' ) and (  `la`.`id`  =  `ld`.`loan_id`  ) and (  `ld`.`Date`  <=  \'2017-09-30\' ) ) group  by  `la`.`acc_no`
client_cs_name=utf8
connection_cl_name=utf8_general_ci
view_body_utf8=select `la`.`date_open` AS `date_open`,`la`.`acc_no` AS `acc_no`,`la`.`loan_against_sv_acc` AS `loan_against_sv_acc`,concat(`a`.`name`,\' [ \',`la`.`name_p`,\' ]\') AS `name`,`la`.`amt` AS `amt`,concat(`la`.`interest`) AS `interest`,max(`ld`.`Date`) AS `max_dt` from ((`co-operativebank-242`.`loan_acc` `la` join `co-operativebank-242`.`j_a` `a`) join `co-operativebank-242`.`loan_deposit` `ld`) where ((`la`.`loan_against_sv_acc` = `a`.`Acc_No`) and (`la`.`date_open` >= \'2017-12-05\') and (`ld`.`status` <> 0) and (`ld`.`Acc_No` = `la`.`acc_no`) and ((select max(`co-operativebank-242`.`loan_deposit`.`Date`) AS `max_dt` from `co-operativebank-242`.`loan_deposit` where ((`co-operativebank-242`.`loan_deposit`.`status` <> 0) and (`co-operativebank-242`.`loan_deposit`.`Acc_No` = `la`.`acc_no`) and (`co-operativebank-242`.`loan_deposit`.`Total_amt` <> 0) and (`co-operativebank-242`.`loan_deposit`.`Date` <= \'2017-09-30\'))) <= `la`.`fianl_date`) and (`la`.`sub_head` = \'23113\') and (`la`.`id` = `ld`.`loan_id`) and (`ld`.`Date` <= \'2017-09-30\')) group by `la`.`acc_no`
