TYPE=VIEW
query=select `la`.`acc_no` AS `acc_no`,`la`.`name` AS `name`,`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`.`od_days` / 365)) * (`li`.`od_int` / 100)) + ((`li`.`clear_amt` * (`li`.`cc_days` / 365)) * (`li`.`cc_int` / 100)))),0) AS `od_int_a`,round(if((`li`.`tdate` <= `li`.`fianl_date`),((`li`.`clear_amt` * (`li`.`days` / 365)) * (`li`.`cc_int` / 100)),0),0) AS `cc_int_a`,if((timestampdiff(MONTH,`li`.`issue_date`,`li`.`tdate`) < 21),`li`.`clear_amt`,0) AS `standard`,if(((timestampdiff(MONTH,`li`.`issue_date`,`li`.`tdate`) >= 21) and (timestampdiff(MONTH,`li`.`issue_date`,`li`.`tdate`) < 36)),`li`.`clear_amt`,0) AS `sub_standard`,0 AS `r_value`,if(((timestampdiff(MONTH,`li`.`issue_date`,`li`.`tdate`) >= 36) and (timestampdiff(MONTH,`li`.`issue_date`,`li`.`tdate`) < 48)),`li`.`clear_amt`,0) AS `d1`,if(((timestampdiff(MONTH,`li`.`issue_date`,`li`.`tdate`) >= 48) and (timestampdiff(MONTH,`li`.`issue_date`,`li`.`tdate`) < 72)),`li`.`clear_amt`,0) AS `d2`,if((timestampdiff(MONTH,`li`.`issue_date`,`li`.`tdate`) >= 72),`li`.`clear_amt`,0) AS `d3`,0 AS `unsecure`,0 AS `loss`,`li`.`days` AS `days` from (`co-operativebank-bajbajia`.`loan_inf` `li` join `co-operativebank-bajbajia`.`loan_account` `la`) where ((`la`.`acc_no` = `li`.`acc_no`) and (`li`.`clear_amt` >= 0) and (`li`.`clear_amt` <> 0)) group by `li`.`acc_no`
md5=93f3a28612466c961301198e8faf8a3d
updatable=0
algorithm=0
definer_user=root
definer_host=localhost
suid=1
with_check_option=0
timestamp=2019-01-10 05:52:21
create-version=1
source=select `la`.`acc_no` AS `acc_no`,`la`.`name` AS `name`,`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`.`od_days` / 365)) * (`li`.`od_int` / 100)) + ((`li`.`clear_amt` * (`li`.`cc_days` / 365)) * (`li`.`cc_int` / 100)))),0) AS `od_int_a`,round(if((`li`.`tdate` <= `li`.`fianl_date`),((`li`.`clear_amt` * (`li`.`days` / 365)) * (`li`.`cc_int` / 100)),0),0) AS `cc_int_a`,if((timestampdiff(MONTH,`li`.`issue_date`,`li`.`tdate`) < 21),`li`.`clear_amt`,0) AS `standard`,if(((timestampdiff(MONTH,`li`.`issue_date`,`li`.`tdate`) >= 21) and (timestampdiff(MONTH,`li`.`issue_date`,`li`.`tdate`) < 36)),`li`.`clear_amt`,0) AS `sub_standard`,0 AS `r_value`,if(((timestampdiff(MONTH,`li`.`issue_date`,`li`.`tdate`) >= 36) and (timestampdiff(MONTH,`li`.`issue_date`,`li`.`tdate`) < 48)),`li`.`clear_amt`,0) AS `d1`,if(((timestampdiff(MONTH,`li`.`issue_date`,`li`.`tdate`) >= 48) and (timestampdiff(MONTH,`li`.`issue_date`,`li`.`tdate`) < 72)),`li`.`clear_amt`,0) AS `d2`,if((timestampdiff(MONTH,`li`.`issue_date`,`li`.`tdate`) >= 72),`li`.`clear_amt`,0) AS `d3`,0 AS `unsecure`,0 AS `loss`,`li`.`days` AS `days` from (`loan_inf` `li` join `loan_account` `la`) where ((`la`.`acc_no` = `li`.`acc_no`) and (`li`.`clear_amt` >= 0) and (`li`.`clear_amt` <> 0)) 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`,`la`.`name` AS `name`,`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`.`od_days` / 365)) * (`li`.`od_int` / 100)) + ((`li`.`clear_amt` * (`li`.`cc_days` / 365)) * (`li`.`cc_int` / 100)))),0) AS `od_int_a`,round(if((`li`.`tdate` <= `li`.`fianl_date`),((`li`.`clear_amt` * (`li`.`days` / 365)) * (`li`.`cc_int` / 100)),0),0) AS `cc_int_a`,if((timestampdiff(MONTH,`li`.`issue_date`,`li`.`tdate`) < 21),`li`.`clear_amt`,0) AS `standard`,if(((timestampdiff(MONTH,`li`.`issue_date`,`li`.`tdate`) >= 21) and (timestampdiff(MONTH,`li`.`issue_date`,`li`.`tdate`) < 36)),`li`.`clear_amt`,0) AS `sub_standard`,0 AS `r_value`,if(((timestampdiff(MONTH,`li`.`issue_date`,`li`.`tdate`) >= 36) and (timestampdiff(MONTH,`li`.`issue_date`,`li`.`tdate`) < 48)),`li`.`clear_amt`,0) AS `d1`,if(((timestampdiff(MONTH,`li`.`issue_date`,`li`.`tdate`) >= 48) and (timestampdiff(MONTH,`li`.`issue_date`,`li`.`tdate`) < 72)),`li`.`clear_amt`,0) AS `d2`,if((timestampdiff(MONTH,`li`.`issue_date`,`li`.`tdate`) >= 72),`li`.`clear_amt`,0) AS `d3`,0 AS `unsecure`,0 AS `loss`,`li`.`days` AS `days` from (`co-operativebank-bajbajia`.`loan_inf` `li` join `co-operativebank-bajbajia`.`loan_account` `la`) where ((`la`.`acc_no` = `li`.`acc_no`) and (`li`.`clear_amt` >= 0) and (`li`.`clear_amt` <> 0)) group by `li`.`acc_no`
