TYPE=VIEW
query=select max(`v`.`date`) AS `date`,`v`.`Acc_no` AS `acc_no`,if(((sum(`v`.`cr`) - sum(`v`.`dr`)) > 0),\'Active\',\'Close\') AS `Status` from `co-operativebank-neturia`.`voucher` `v` where (((`v`.`head` = \'14100\') or (`v`.`head` = \'14200\') or (`v`.`head` = \'14300\')) and (`v`.`date` <= \'2021-04-08\') and ((`v`.`cr` > 0) or (`v`.`dr` > 0))) group by `v`.`Acc_no` union all select max(`v`.`date`) AS `date`,`v`.`Acc_no` AS `acc_no`,if(((sum(`v`.`dr`) - sum(`v`.`cr`)) > 0),\'Active\',\'Close\') AS `Status` from `co-operativebank-neturia`.`voucher` `v` where (((`v`.`head` = \'23300\') or (`v`.`head` = \'23400\') or (`v`.`head` = \'23100\') or (`v`.`head` = \'23200\')) and (`v`.`date` <= \'2021-04-08\') and ((`v`.`cr` > 0) or (`v`.`dr` > 0))) group by `v`.`Acc_no` union all select max(`v`.`date`) AS `date`,`v`.`Acc_no` AS `acc_no`,if(((sum(`v`.`cr`) - sum(`v`.`dr`)) > 0),\'Active\',\'Close\') AS `Status` from `co-operativebank-neturia`.`voucher` `v` where (((`v`.`head` = \'11100\') or (`v`.`head` = \'11200\')) and (`v`.`date` <= \'2021-04-08\') and ((`v`.`cr` > 0) or (`v`.`dr` > 0))) group by `v`.`Acc_no`
md5=3536864866e910eb88baef9e10fbc064
updatable=0
algorithm=0
definer_user=admin
definer_host=localhost
suid=1
with_check_option=0
timestamp=2021-08-30 16:46:26
create-version=1
source=select max(  `v`.`date`  )  AS  `date` ,\n `v`.`Acc_no`  AS  `acc_no` ,\nif( ( ( sum(  `v`.`cr`  )  - sum(  `v`.`dr`  )  )  >0 ),\n \'Active\',\n \'Close\' ) AS  `Status`  from  `co-operativebank-neturia`.`voucher`  `v`  where ( ( (  `v`.`head`  =  \'14100\' ) or (  `v`.`head`  =  \'14200\' ) or (  `v`.`head`  =  \'14300\' ) ) and (  `v`.`date`  <=  \'2021-04-08\' ) and ( (  `v`.`cr`  >0 ) or (  `v`.`dr`  >0 ) ) ) group  by  `v`.`Acc_no`  union  all  select max(  `v`.`date`  )  AS  `date` ,\n `v`.`Acc_no`  AS  `acc_no` ,\nif( ( ( sum(  `v`.`dr`  )  - sum(  `v`.`cr`  )  )  >0 ),\n \'Active\',\n \'Close\' ) AS  `Status`  from  `co-operativebank-neturia`.`voucher`  `v`  where ( ( (  `v`.`head`  =  \'23300\' ) or (  `v`.`head`  =  \'23400\' ) or (  `v`.`head`  =  \'23100\' ) or (  `v`.`head`  =  \'23200\' ) ) and (  `v`.`date`  <=  \'2021-04-08\' ) and ( (  `v`.`cr`  >0 ) or (  `v`.`dr`  >0 ) ) ) group  by  `v`.`Acc_no`  union  all  select max(  `v`.`date`  )  AS  `date` ,\n `v`.`Acc_no`  AS  `acc_no` ,\nif( ( ( sum(  `v`.`cr`  )  - sum(  `v`.`dr`  )  )  >0 ),\n \'Active\',\n \'Close\' ) AS  `Status`  from  `co-operativebank-neturia`.`voucher`  `v`  where ( ( (  `v`.`head`  =  \'11100\' ) or (  `v`.`head`  =  \'11200\' ) ) and (  `v`.`date`  <=  \'2021-04-08\' ) and ( (  `v`.`cr`  >0 ) or (  `v`.`dr`  >0 ) ) ) group  by  `v`.`Acc_no`
client_cs_name=utf8
connection_cl_name=utf8_general_ci
view_body_utf8=select max(`v`.`date`) AS `date`,`v`.`Acc_no` AS `acc_no`,if(((sum(`v`.`cr`) - sum(`v`.`dr`)) > 0),\'Active\',\'Close\') AS `Status` from `co-operativebank-neturia`.`voucher` `v` where (((`v`.`head` = \'14100\') or (`v`.`head` = \'14200\') or (`v`.`head` = \'14300\')) and (`v`.`date` <= \'2021-04-08\') and ((`v`.`cr` > 0) or (`v`.`dr` > 0))) group by `v`.`Acc_no` union all select max(`v`.`date`) AS `date`,`v`.`Acc_no` AS `acc_no`,if(((sum(`v`.`dr`) - sum(`v`.`cr`)) > 0),\'Active\',\'Close\') AS `Status` from `co-operativebank-neturia`.`voucher` `v` where (((`v`.`head` = \'23300\') or (`v`.`head` = \'23400\') or (`v`.`head` = \'23100\') or (`v`.`head` = \'23200\')) and (`v`.`date` <= \'2021-04-08\') and ((`v`.`cr` > 0) or (`v`.`dr` > 0))) group by `v`.`Acc_no` union all select max(`v`.`date`) AS `date`,`v`.`Acc_no` AS `acc_no`,if(((sum(`v`.`cr`) - sum(`v`.`dr`)) > 0),\'Active\',\'Close\') AS `Status` from `co-operativebank-neturia`.`voucher` `v` where (((`v`.`head` = \'11100\') or (`v`.`head` = \'11200\')) and (`v`.`date` <= \'2021-04-08\') and ((`v`.`cr` > 0) or (`v`.`dr` > 0))) group by `v`.`Acc_no`
