TYPE=VIEW
query=select `d`.`acc_no` AS `acc_no`,concat(`a`.`fname`,\' \',`a`.`mname`,\' \',`a`.`lname`) AS `Name`,`d`.`lf_no` AS `lf_no`,(`d`.`amt` * if((`d`.`maturity_date` < (now() + interval -(10) day)),(timestampdiff(MONTH,(`d`.`date_open` + interval -(1) month),`d`.`maturity_date`) + 1),(timestampdiff(MONTH,(`d`.`date_open` + interval -(1) month),(now() + interval -(10) day)) + 1))) AS `Actual_Amt`,`d`.`date_open` AS `date_open`,`d`.`maturity_date` AS `maturity_date`,sum(`v`.`cr`) AS `Clear_Bal`,((`d`.`amt` * if((`d`.`maturity_date` < (now() + interval -(10) day)),(timestampdiff(MONTH,(`d`.`date_open` + interval -(1) month),`d`.`maturity_date`) + 1),(timestampdiff(MONTH,(`d`.`date_open` + interval -(1) month),(now() + interval -(10) day)) + 1))) - sum(`v`.`cr`)) AS `Pay_amt`,(sum(`v`.`cr`) / `d`.`amt`) AS `Premium_Cmpt`,((`d`.`Duration` * 3) - (sum(`v`.`cr`) / `d`.`amt`)) AS `total_due_premium`,`d`.`amt` AS `amt` from ((`co-operativebank`.`deposit_acc` `d` join `co-operativebank`.`voucher` `v`) join `co-operativebank`.`applicant` `a`) where ((`a`.`Acc_No` = `v`.`Acc_no`) and (`a`.`Acc_No` = `d`.`acc_no`) and (`v`.`Acc_no` = `d`.`acc_no`) and (`d`.`acc_type` = \'rd\') and (`d`.`status` = \'Active\')) group by `v`.`Acc_no`
md5=936879117ce9748b75f9ead62906569e
updatable=0
algorithm=0
definer_user=root
definer_host=localhost
suid=1
with_check_option=0
timestamp=2018-07-27 05:54:45
create-version=1
source=select `d`.`acc_no` AS `acc_no`,concat(`a`.`fname`,\' \',`a`.`mname`,\' \',`a`.`lname`) AS `Name`,`d`.`lf_no` AS `lf_no`,(`d`.`amt` * if((`d`.`maturity_date` < (now() + interval -(10) day)),(timestampdiff(MONTH,(`d`.`date_open` + interval -(1) month),`d`.`maturity_date`) + 1),(timestampdiff(MONTH,(`d`.`date_open` + interval -(1) month),(now() + interval -(10) day)) + 1))) AS `Actual_Amt`,`d`.`date_open` AS `date_open`,`d`.`maturity_date` AS `maturity_date`,sum(`v`.`cr`) AS `Clear_Bal`,((`d`.`amt` * if((`d`.`maturity_date` < (now() + interval -(10) day)),(timestampdiff(MONTH,(`d`.`date_open` + interval -(1) month),`d`.`maturity_date`) + 1),(timestampdiff(MONTH,(`d`.`date_open` + interval -(1) month),(now() + interval -(10) day)) + 1))) - sum(`v`.`cr`)) AS `Pay_amt`,(sum(`v`.`cr`) / `d`.`amt`) AS `Premium_Cmpt`,((`d`.`Duration` * 3) - (sum(`v`.`cr`) / `d`.`amt`)) AS `total_due_premium`,`d`.`amt` AS `amt` from ((`deposit_acc` `d` join `voucher` `v`) join `applicant` `a`) where ((`a`.`Acc_No` = `v`.`Acc_no`) and (`a`.`Acc_No` = `d`.`acc_no`) and (`v`.`Acc_no` = `d`.`acc_no`) and (`d`.`acc_type` = \'rd\') and (`d`.`status` = \'Active\')) group by `v`.`Acc_no`
client_cs_name=utf8
connection_cl_name=utf8_general_ci
view_body_utf8=select `d`.`acc_no` AS `acc_no`,concat(`a`.`fname`,\' \',`a`.`mname`,\' \',`a`.`lname`) AS `Name`,`d`.`lf_no` AS `lf_no`,(`d`.`amt` * if((`d`.`maturity_date` < (now() + interval -(10) day)),(timestampdiff(MONTH,(`d`.`date_open` + interval -(1) month),`d`.`maturity_date`) + 1),(timestampdiff(MONTH,(`d`.`date_open` + interval -(1) month),(now() + interval -(10) day)) + 1))) AS `Actual_Amt`,`d`.`date_open` AS `date_open`,`d`.`maturity_date` AS `maturity_date`,sum(`v`.`cr`) AS `Clear_Bal`,((`d`.`amt` * if((`d`.`maturity_date` < (now() + interval -(10) day)),(timestampdiff(MONTH,(`d`.`date_open` + interval -(1) month),`d`.`maturity_date`) + 1),(timestampdiff(MONTH,(`d`.`date_open` + interval -(1) month),(now() + interval -(10) day)) + 1))) - sum(`v`.`cr`)) AS `Pay_amt`,(sum(`v`.`cr`) / `d`.`amt`) AS `Premium_Cmpt`,((`d`.`Duration` * 3) - (sum(`v`.`cr`) / `d`.`amt`)) AS `total_due_premium`,`d`.`amt` AS `amt` from ((`co-operativebank`.`deposit_acc` `d` join `co-operativebank`.`voucher` `v`) join `co-operativebank`.`applicant` `a`) where ((`a`.`Acc_No` = `v`.`Acc_no`) and (`a`.`Acc_No` = `d`.`acc_no`) and (`v`.`Acc_no` = `d`.`acc_no`) and (`d`.`acc_type` = \'rd\') and (`d`.`status` = \'Active\')) group by `v`.`Acc_no`
