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-bajbajia`.`voucher` `v` where (((`v`.`head` = \'14100\') or (`v`.`head` = \'14200\') or (`v`.`head` = \'14300\')) and (`v`.`date` <= \'2018-06-30\') 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-bajbajia`.`voucher` `v` where (((`v`.`head` = \'23300\') or (`v`.`head` = \'23400\') or (`v`.`head` = \'23100\') or (`v`.`head` = \'23200\')) and (`v`.`date` <= \'2018-06-30\') 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-bajbajia`.`voucher` `v` where (((`v`.`head` = \'11100\') or (`v`.`head` = \'11200\')) and (`v`.`date` <= \'2018-06-30\') and ((`v`.`cr` > 0) or (`v`.`dr` > 0))) group by `v`.`Acc_no`
md5=ac024cea0d0b89c4249ed561fb609909
updatable=0
algorithm=0
definer_user=admin
definer_host=localhost
suid=1
with_check_option=0
timestamp=2019-01-10 05:51:44
create-version=1
source=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 `voucher` `v` where (((`v`.`head` = \'14100\') or (`v`.`head` = \'14200\') or (`v`.`head` = \'14300\')) and (`v`.`date` <= \'2018-06-30\') 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 `voucher` `v` where (((`v`.`head` = \'23300\') or (`v`.`head` = \'23400\') or (`v`.`head` = \'23100\') or (`v`.`head` = \'23200\')) and (`v`.`date` <= \'2018-06-30\') 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 `voucher` `v` where (((`v`.`head` = \'11100\') or (`v`.`head` = \'11200\')) and (`v`.`date` <= \'2018-06-30\') 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-bajbajia`.`voucher` `v` where (((`v`.`head` = \'14100\') or (`v`.`head` = \'14200\') or (`v`.`head` = \'14300\')) and (`v`.`date` <= \'2018-06-30\') 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-bajbajia`.`voucher` `v` where (((`v`.`head` = \'23300\') or (`v`.`head` = \'23400\') or (`v`.`head` = \'23100\') or (`v`.`head` = \'23200\')) and (`v`.`date` <= \'2018-06-30\') 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-bajbajia`.`voucher` `v` where (((`v`.`head` = \'11100\') or (`v`.`head` = \'11200\')) and (`v`.`date` <= \'2018-06-30\') and ((`v`.`cr` > 0) or (`v`.`dr` > 0))) group by `v`.`Acc_no`
