TYPE=VIEW
query=select `la`.`acc_no` AS `acc_no`,concat(`la`.`fname`,\' \',`la`.`mname`,\' \',`la`.`lname`) AS `name`,`la`.`father_name` AS `father_name`,`la`.`address` AS `address`,`la`.`mobile` AS `mobile`,`li`.`issue_date` AS `issue_date`,`li`.`loan_amt` AS `loan_amt`,concat(`li`.`ins_type`,\' [ \',`li`.`duration`,`li`.`duration_type`,\' ]\') AS `ist_type`,round((`li`.`loan_amt` / `li`.`loan_inst`),0) AS `inst_ant`,`li`.`imst_date` AS `due_date`,round(if((`li`.`tdate` <= `li`.`fianl_date`),0,`li`.`clear_amt`),0) AS `od_amt`,`li`.`clear_amt` AS `clear_amt`,round(if((`li`.`tdate` <= `li`.`fianl_date`),0,((((`li`.`clear_amt` * (`li`.`days` / 365)) * (`li`.`od_int` / 100)) + `li`.`cc_int_due`) + `li`.`od_int_due`)),0) AS `od_int_a`,round(if((`li`.`tdate` <= `li`.`fianl_date`),((((`li`.`clear_amt` * (`li`.`days` / 365)) * (`li`.`cc_int` / 100)) + `li`.`cc_int_due`) + `li`.`od_int_due`),0),0) AS `cc_int_a`,if((timestampdiff(DAY,`li`.`imst_date`,`li`.`tdate`) < 90),`li`.`clear_amt`,0) AS `standard`,if(((timestampdiff(DAY,`li`.`imst_date`,`li`.`tdate`) >= 90) and (timestampdiff(DAY,`li`.`imst_date`,`li`.`tdate`) < 1095)),`li`.`clear_amt`,0) AS `sub_standard`,if((timestampdiff(DAY,`li`.`imst_date`,`li`.`tdate`) >= 1095),if((`ss`.`bal` > `li`.`clear_amt`),0,`ss`.`bal`),0) AS `r_value`,if(((timestampdiff(DAY,`li`.`imst_date`,`li`.`tdate`) >= 1095) and (timestampdiff(DAY,`li`.`imst_date`,`li`.`tdate`) < 1460)),if((`ss`.`bal` > `li`.`clear_amt`),`li`.`clear_amt`,`ss`.`bal`),0) AS `d1`,if(((timestampdiff(DAY,`li`.`imst_date`,`li`.`tdate`) >= 1460) and (timestampdiff(DAY,`li`.`imst_date`,`li`.`tdate`) < 2190)),if((`ss`.`bal` > `li`.`clear_amt`),`li`.`clear_amt`,`ss`.`bal`),0) AS `d2`,if((timestampdiff(DAY,`li`.`imst_date`,`li`.`tdate`) >= 2190),if((`ss`.`bal` > `li`.`clear_amt`),`li`.`clear_amt`,`ss`.`bal`),0) AS `d3`,if((timestampdiff(DAY,`li`.`imst_date`,`li`.`tdate`) >= 1095),if((`ss`.`bal` > `li`.`clear_amt`),0,(`li`.`clear_amt` - `ss`.`bal`)),0) AS `unsecure`,0 AS `loss`,`li`.`days` AS `days`,`la`.`loan_against_sv_acc` AS `sbacc` from ((`co-operativebank-198`.`loan_inf` `li` join `co-operativebank-198`.`loan_account` `la`) join `co-operativebank-198`.`shg_loan_s` `ss`) where ((`ss`.`loan_acc` = `la`.`acc_no`) and (`ss`.`loan_acc` = `li`.`acc_no`) and (`la`.`acc_no` = `li`.`acc_no`)) group by `li`.`acc_no`
md5=6054c16b3529a5fd625589283e4bab9f
updatable=0
algorithm=0
definer_user=admin
definer_host=localhost
suid=1
with_check_option=0
timestamp=2022-07-28 05:49:38
create-version=1
source=select  `la`.`acc_no`  AS  `acc_no` ,\nconcat(  `la`.`fname` ,  \' \',  `la`.`mname` ,  \' \',  `la`.`lname`  )  AS  `name` ,\n `la`.`father_name`  AS  `father_name` ,\n `la`.`address`  AS  `address` ,\n `la`.`mobile`  AS  `mobile` ,\n `li`.`issue_date`  AS  `issue_date` ,\n `li`.`loan_amt`  AS  `loan_amt` ,\nconcat(  `li`.`ins_type` ,  \' [ \',  `li`.`duration` ,  `li`.`duration_type` ,  \' ]\'  )  AS  `ist_type` ,\nround( (  `li`.`loan_amt`  /  `li`.`loan_inst`  ), 0  )  AS  `inst_ant` ,\n `li`.`imst_date`  AS  `due_date` ,\nround( if( (  `li`.`tdate`  <=  `li`.`fianl_date`  ), 0,  `li`.`clear_amt`  ) , 0  )  AS  `od_amt` ,\n `li`.`clear_amt`  AS  `clear_amt` ,\nround( if( (  `li`.`tdate`  <=  `li`.`fianl_date`  ), 0, ( ( ( (  `li`.`clear_amt`  * (  `li`.`days`  /365  )  )  * (  `li`.`od_int`  /100  )  )  +  `li`.`cc_int_due`  ) +  `li`.`od_int_due`  ) ),\n0 ) AS  `od_int_a` ,\nround( if( (  `li`.`tdate`  <=  `li`.`fianl_date`  ), ( ( ( (  `li`.`clear_amt`  * (  `li`.`days`  /365  )  )  * (  `li`.`cc_int`  /100  )  )  +  `li`.`cc_int_due`  ) +  `li`.`od_int_due`  ),\n0 ),\n0 ) AS  `cc_int_a` ,\nif( ( timestampdiff(  DAY ,  `li`.`imst_date` ,  `li`.`tdate`  )  <90  ) ,\n `li`.`clear_amt` ,\n0 ) AS  `standard` ,\nif( ( ( timestampdiff(  DAY ,  `li`.`imst_date` ,  `li`.`tdate`  )  >=90  )  and ( timestampdiff(  DAY ,  `li`.`imst_date` ,  `li`.`tdate`  )  <1095 ) ),\n `li`.`clear_amt` ,\n0 ) AS  `sub_standard` ,\nif( ( timestampdiff(  DAY ,  `li`.`imst_date` ,  `li`.`tdate`  )  >=1095  ) ,\nif( (  `ss`.`bal`  >  `li`.`clear_amt`  ), 0,  `ss`.`bal`  ) ,\n0 ) AS  `r_value` ,\nif( ( ( timestampdiff(  DAY ,  `li`.`imst_date` ,  `li`.`tdate`  )  >=1095  )  and ( timestampdiff(  DAY ,  `li`.`imst_date` ,  `li`.`tdate`  )  <1460 ) ),\nif( (  `ss`.`bal`  >  `li`.`clear_amt`  ),  `li`.`clear_amt` ,  `ss`.`bal`  ) ,\n0 ) AS  `d1` ,\nif( ( ( timestampdiff(  DAY ,  `li`.`imst_date` ,  `li`.`tdate`  )  >=1460  )  and ( timestampdiff(  DAY ,  `li`.`imst_date` ,  `li`.`tdate`  )  <2190 ) ),\nif( (  `ss`.`bal`  >  `li`.`clear_amt`  ),  `li`.`clear_amt` ,  `ss`.`bal`  ) ,\n0 ) AS  `d2` ,\nif( ( timestampdiff(  DAY ,  `li`.`imst_date` ,  `li`.`tdate`  )  >=2190  ) ,\nif( (  `ss`.`bal`  >  `li`.`clear_amt`  ),  `li`.`clear_amt` ,  `ss`.`bal`  ) ,\n0 ) AS  `d3` ,\nif( ( timestampdiff(  DAY ,  `li`.`imst_date` ,  `li`.`tdate`  )  >=1095  ) ,\nif( (  `ss`.`bal`  >  `li`.`clear_amt`  ), 0, (  `li`.`clear_amt`  -  `ss`.`bal`  ) ) ,\n0 ) AS  `unsecure` ,\n0 AS  `loss` ,\n `li`.`days`  AS  `days` ,\n `la`.`loan_against_sv_acc`  AS  `sbacc`  from ( (  `co-operativebank-198`.`loan_inf`  `li`  join  `co-operativebank-198`.`loan_account`  `la`  ) join  `co-operativebank-198`.`shg_loan_s`  `ss`  ) where ( (  `ss`.`loan_acc`  =  `la`.`acc_no`  ) and (  `ss`.`loan_acc`  =  `li`.`acc_no`  ) and (  `la`.`acc_no`  =  `li`.`acc_no`  ) ) group  by  `li`.`acc_no`
client_cs_name=utf8
connection_cl_name=utf8_general_ci
view_body_utf8=select `la`.`acc_no` AS `acc_no`,concat(`la`.`fname`,\' \',`la`.`mname`,\' \',`la`.`lname`) AS `name`,`la`.`father_name` AS `father_name`,`la`.`address` AS `address`,`la`.`mobile` AS `mobile`,`li`.`issue_date` AS `issue_date`,`li`.`loan_amt` AS `loan_amt`,concat(`li`.`ins_type`,\' [ \',`li`.`duration`,`li`.`duration_type`,\' ]\') AS `ist_type`,round((`li`.`loan_amt` / `li`.`loan_inst`),0) AS `inst_ant`,`li`.`imst_date` AS `due_date`,round(if((`li`.`tdate` <= `li`.`fianl_date`),0,`li`.`clear_amt`),0) AS `od_amt`,`li`.`clear_amt` AS `clear_amt`,round(if((`li`.`tdate` <= `li`.`fianl_date`),0,((((`li`.`clear_amt` * (`li`.`days` / 365)) * (`li`.`od_int` / 100)) + `li`.`cc_int_due`) + `li`.`od_int_due`)),0) AS `od_int_a`,round(if((`li`.`tdate` <= `li`.`fianl_date`),((((`li`.`clear_amt` * (`li`.`days` / 365)) * (`li`.`cc_int` / 100)) + `li`.`cc_int_due`) + `li`.`od_int_due`),0),0) AS `cc_int_a`,if((timestampdiff(DAY,`li`.`imst_date`,`li`.`tdate`) < 90),`li`.`clear_amt`,0) AS `standard`,if(((timestampdiff(DAY,`li`.`imst_date`,`li`.`tdate`) >= 90) and (timestampdiff(DAY,`li`.`imst_date`,`li`.`tdate`) < 1095)),`li`.`clear_amt`,0) AS `sub_standard`,if((timestampdiff(DAY,`li`.`imst_date`,`li`.`tdate`) >= 1095),if((`ss`.`bal` > `li`.`clear_amt`),0,`ss`.`bal`),0) AS `r_value`,if(((timestampdiff(DAY,`li`.`imst_date`,`li`.`tdate`) >= 1095) and (timestampdiff(DAY,`li`.`imst_date`,`li`.`tdate`) < 1460)),if((`ss`.`bal` > `li`.`clear_amt`),`li`.`clear_amt`,`ss`.`bal`),0) AS `d1`,if(((timestampdiff(DAY,`li`.`imst_date`,`li`.`tdate`) >= 1460) and (timestampdiff(DAY,`li`.`imst_date`,`li`.`tdate`) < 2190)),if((`ss`.`bal` > `li`.`clear_amt`),`li`.`clear_amt`,`ss`.`bal`),0) AS `d2`,if((timestampdiff(DAY,`li`.`imst_date`,`li`.`tdate`) >= 2190),if((`ss`.`bal` > `li`.`clear_amt`),`li`.`clear_amt`,`ss`.`bal`),0) AS `d3`,if((timestampdiff(DAY,`li`.`imst_date`,`li`.`tdate`) >= 1095),if((`ss`.`bal` > `li`.`clear_amt`),0,(`li`.`clear_amt` - `ss`.`bal`)),0) AS `unsecure`,0 AS `loss`,`li`.`days` AS `days`,`la`.`loan_against_sv_acc` AS `sbacc` from ((`co-operativebank-198`.`loan_inf` `li` join `co-operativebank-198`.`loan_account` `la`) join `co-operativebank-198`.`shg_loan_s` `ss`) where ((`ss`.`loan_acc` = `la`.`acc_no`) and (`ss`.`loan_acc` = `li`.`acc_no`) and (`la`.`acc_no` = `li`.`acc_no`)) group by `li`.`acc_no`
