TYPE=VIEW
query=select `v`.`sub_head` AS `code`,`sh`.`sub_head` AS `sub_head`,`q`.`name` AS `NAME`,`mc`.`date_open` AS `Opeing_Date`,`mc`.`acc_no` AS `acc_no`,`mc`.`acc_type` AS `acc_type`,(sum(`v`.`cr`) - sum(`v`.`dr`)) AS `bal`,concat(`mc`.`Duration`,\' \',`mc`.`Duration_Type`) AS `Duration`,`mc`.`maturity_date` AS `maturity_date`,timestampdiff(DAY,`mc`.`date_open`,\'2018-04-05\') AS `DAYS` from (((`co-operativebank-mohati`.`mstr_bnk_acc` `mc` join `co-operativebank-mohati`.`voucher` `v`) join `co-operativebank-mohati`.`sub_head` `sh`) join `co-operativebank-mohati`.`quick_name` `q`) where ((`v`.`Acc_no` = `q`.`acc_no`) and (`q`.`acc_no` = `mc`.`acc_no`) and (`v`.`sub_head` = `sh`.`code`) and (`sh`.`code` = `mc`.`sub_head`) and (`v`.`Acc_no` = `mc`.`acc_no`) and (`v`.`date` <= \'2018-04-05\')) group by `mc`.`acc_no`
md5=73d229b10d9080e60bceccc90c91b02a
updatable=0
algorithm=0
definer_user=admin
definer_host=%
suid=1
with_check_option=0
timestamp=2020-10-16 13:11:05
create-version=1
source=select  `v`.`sub_head`  AS  `code` ,\n `sh`.`sub_head`  AS  `sub_head` ,\n `q`.`name`  AS  `NAME` ,\n `mc`.`date_open`  AS  `Opeing_Date` ,\n `mc`.`acc_no`  AS  `acc_no` ,\n `mc`.`acc_type`  AS  `acc_type` ,\n( sum(  `v`.`cr`  )  - sum(  `v`.`dr`  )  ) AS  `bal` ,\nconcat(  `mc`.`Duration` ,  \' \',  `mc`.`Duration_Type`  )  AS  `Duration` ,\n `mc`.`maturity_date`  AS  `maturity_date` ,\ntimestampdiff(  DAY ,  `mc`.`date_open` ,  \'2018-04-05\'  )  AS  `DAYS`  from ( ( (  `co-operativebank-mohati`.`mstr_bnk_acc`  `mc`  join  `co-operativebank-mohati`.`voucher`  `v`  ) join  `co-operativebank-mohati`.`sub_head`  `sh`  ) join  `co-operativebank-mohati`.`quick_name`  `q`  ) where ( (  `v`.`Acc_no`  =  `q`.`acc_no`  ) and (  `q`.`acc_no`  =  `mc`.`acc_no`  ) and (  `v`.`sub_head`  =  `sh`.`code`  ) and (  `sh`.`code`  =  `mc`.`sub_head`  ) and (  `v`.`Acc_no`  =  `mc`.`acc_no`  ) and (  `v`.`date`  <=  \'2018-04-05\' ) ) group  by  `mc`.`acc_no`
client_cs_name=utf8
connection_cl_name=utf8_general_ci
view_body_utf8=select `v`.`sub_head` AS `code`,`sh`.`sub_head` AS `sub_head`,`q`.`name` AS `NAME`,`mc`.`date_open` AS `Opeing_Date`,`mc`.`acc_no` AS `acc_no`,`mc`.`acc_type` AS `acc_type`,(sum(`v`.`cr`) - sum(`v`.`dr`)) AS `bal`,concat(`mc`.`Duration`,\' \',`mc`.`Duration_Type`) AS `Duration`,`mc`.`maturity_date` AS `maturity_date`,timestampdiff(DAY,`mc`.`date_open`,\'2018-04-05\') AS `DAYS` from (((`co-operativebank-mohati`.`mstr_bnk_acc` `mc` join `co-operativebank-mohati`.`voucher` `v`) join `co-operativebank-mohati`.`sub_head` `sh`) join `co-operativebank-mohati`.`quick_name` `q`) where ((`v`.`Acc_no` = `q`.`acc_no`) and (`q`.`acc_no` = `mc`.`acc_no`) and (`v`.`sub_head` = `sh`.`code`) and (`sh`.`code` = `mc`.`sub_head`) and (`v`.`Acc_no` = `mc`.`acc_no`) and (`v`.`date` <= \'2018-04-05\')) group by `mc`.`acc_no`
