TYPE=VIEW
query=select `loan_collection1181062000003`.`loan_id` AS `loan_id`,`loan_collection1181062000003`.`last_day` AS `last_day`,`loan_collection1181062000003`.`nsc` AS `nsc`,`loan_collection1181062000003`.`acc_no` AS `acc_no`,`loan_collection1181062000003`.`fianl_date` AS `fianl_date`,`loan_collection1181062000003`.`duration` AS `duration`,`loan_collection1181062000003`.`duration_type` AS `duration_type`,`loan_collection1181062000003`.`loan_inst` AS `loan_inst`,`loan_collection1181062000003`.`ins_type` AS `ins_type`,`loan_collection1181062000003`.`cc_int` AS `cc_int`,`loan_collection1181062000003`.`od_int` AS `od_int`,`loan_collection1181062000003`.`cc_int_due` AS `cc_int_due`,`loan_collection1181062000003`.`od_int_due` AS `od_int_due`,`loan_collection1181062000003`.`cur_due_amt` AS `cur_due_amt`,`loan_collection1181062000003`.`jer_amt` AS `jer_amt`,`loan_collection1181062000003`.`no_inst` AS `no_inst`,`loan_collection1181062000003`.`loan_amt` AS `loan_amt`,`loan_collection1181062000003`.`Inst_amt` AS `Inst_amt`,`loan_collection1181062000003`.`clear_amt` AS `clear_amt`,`loan_collection1181062000003`.`total_pay` AS `total_pay`,`loan_collection1181062000003`.`sum(prin_amt)` AS `sum(prin_amt)`,`loan_collection1181062000003`.`pay_date` AS `pay_date`,`loan_collection1181062000003`.`days` AS `days`,`loan_collection1181062000003`.`cc_days` AS `cc_days`,`loan_collection1181062000003`.`od_days` AS `od_days`,`loan_collection1181062000003`.`inst_day` AS `inst_day`,`loan_collection1181062000003`.`dur_day` AS `dur_day`,`loan_collection1181062000003`.`issue_date` AS `issue_date`,`loan_collection1181062000003`.`imst_date` AS `imst_date`,(to_days(\'2025-12-24\') - to_days(if((`loan_collection1181062000003`.`imst_date` >= `loan_collection1181062000003`.`pay_date`),`loan_collection1181062000003`.`imst_date`,`loan_collection1181062000003`.`pay_date`))) AS `oddays` from `co-operativebank-henria`.`loan_collection1181062000003`
md5=cc6af0b0162519d589cefa6abaaf5052
updatable=0
algorithm=0
definer_user=admin
definer_host=%
suid=2
with_check_option=0
timestamp=2025-12-24 03:17:35
create-version=1
source=SELECT *,datediff(\'2025-12-24\',if(`imst_date`>=`pay_date`,`imst_date`,`pay_date`)) as oddays FROM loan_collection1181062000003
client_cs_name=utf8
connection_cl_name=utf8_general_ci
view_body_utf8=select `loan_collection1181062000003`.`loan_id` AS `loan_id`,`loan_collection1181062000003`.`last_day` AS `last_day`,`loan_collection1181062000003`.`nsc` AS `nsc`,`loan_collection1181062000003`.`acc_no` AS `acc_no`,`loan_collection1181062000003`.`fianl_date` AS `fianl_date`,`loan_collection1181062000003`.`duration` AS `duration`,`loan_collection1181062000003`.`duration_type` AS `duration_type`,`loan_collection1181062000003`.`loan_inst` AS `loan_inst`,`loan_collection1181062000003`.`ins_type` AS `ins_type`,`loan_collection1181062000003`.`cc_int` AS `cc_int`,`loan_collection1181062000003`.`od_int` AS `od_int`,`loan_collection1181062000003`.`cc_int_due` AS `cc_int_due`,`loan_collection1181062000003`.`od_int_due` AS `od_int_due`,`loan_collection1181062000003`.`cur_due_amt` AS `cur_due_amt`,`loan_collection1181062000003`.`jer_amt` AS `jer_amt`,`loan_collection1181062000003`.`no_inst` AS `no_inst`,`loan_collection1181062000003`.`loan_amt` AS `loan_amt`,`loan_collection1181062000003`.`Inst_amt` AS `Inst_amt`,`loan_collection1181062000003`.`clear_amt` AS `clear_amt`,`loan_collection1181062000003`.`total_pay` AS `total_pay`,`loan_collection1181062000003`.`sum(prin_amt)` AS `sum(prin_amt)`,`loan_collection1181062000003`.`pay_date` AS `pay_date`,`loan_collection1181062000003`.`days` AS `days`,`loan_collection1181062000003`.`cc_days` AS `cc_days`,`loan_collection1181062000003`.`od_days` AS `od_days`,`loan_collection1181062000003`.`inst_day` AS `inst_day`,`loan_collection1181062000003`.`dur_day` AS `dur_day`,`loan_collection1181062000003`.`issue_date` AS `issue_date`,`loan_collection1181062000003`.`imst_date` AS `imst_date`,(to_days(\'2025-12-24\') - to_days(if((`loan_collection1181062000003`.`imst_date` >= `loan_collection1181062000003`.`pay_date`),`loan_collection1181062000003`.`imst_date`,`loan_collection1181062000003`.`pay_date`))) AS `oddays` from `co-operativebank-henria`.`loan_collection1181062000003`
