TYPE=VIEW
query=select `v`.`date` AS `date`,`b`.`code` AS `acc_no`,`b`.`sub_head` AS `b_sub_head`,0 AS `cr`,0 AS `dr`,`b`.`loan_sub_head` AS `p_sub_head`,if(((`b`.`loan_sub_head` = \'23101A\') or (`b`.`loan_sub_head` = \'23101B\')),23100,\'\') AS `marge_teble`,sum(`v`.`cr`) AS `bcr`,sum(`v`.`dr`) AS `bdr` from (`co-operativebank-henria`.`borrowing` `b` join `co-operativebank-henria`.`voucher` `v`) where ((`v`.`sub_head` = `b`.`sub_head`) and (`v`.`Acc_no` = `b`.`code`)) group by `v`.`date`,`b`.`sub_head`,`b`.`date` union all select `v`.`date` AS `date`,`v`.`Acc_no` AS `acc_no`,`v`.`sub_head` AS `b_sub_head`,sum(`v`.`dr`) AS `cr`,sum(`v`.`cr`) AS `dr`,`v`.`sub_head` AS `p_sub_head`,if(((`v`.`sub_head` = \'23101A\') or (`v`.`sub_head` = \'23101B\')),23100,\'\') AS `marge_teble`,0 AS `cr`,0 AS `dr` from `co-operativebank-henria`.`voucher` `v` where ((`v`.`date` <= \'2022-04-30\') and ((`v`.`head` = \'23100\') or (`v`.`head` = \'23200\') or (`v`.`head` = \'23300\') or (`v`.`head` = \'23400\') or ((`v`.`head` = \'23500\') and (`v`.`head` = \'23600\')))) group by `v`.`Acc_no`
md5=16f722931d638fe0c05c165aeec77cca
updatable=0
algorithm=0
definer_user=root
definer_host=localhost
suid=1
with_check_option=0
timestamp=2022-07-24 06:09:49
create-version=1
source=select `v`.`date` AS `date`,`b`.`code` AS `acc_no`,`b`.`sub_head` AS `b_sub_head`,0 AS `cr`,0 AS `dr`,`b`.`loan_sub_head` AS `p_sub_head`,if(((`b`.`loan_sub_head` = \'23101A\') or (`b`.`loan_sub_head` = \'23101B\')),23100,\'\') AS `marge_teble`,sum(`v`.`cr`) AS `bcr`,sum(`v`.`dr`) AS `bdr` from (`borrowing` `b` join `voucher` `v`) where ((`v`.`sub_head` = `b`.`sub_head`) and (`v`.`Acc_no` = `b`.`code`)) group by `v`.`date`,`b`.`sub_head`,`b`.`date` union all select `v`.`date` AS `date`,`v`.`Acc_no` AS `acc_no`,`v`.`sub_head` AS `b_sub_head`,sum(`v`.`dr`) AS `cr`,sum(`v`.`cr`) AS `dr`,`v`.`sub_head` AS `p_sub_head`,if(((`v`.`sub_head` = \'23101A\') or (`v`.`sub_head` = \'23101B\')),23100,\'\') AS `marge_teble`,0 AS `cr`,0 AS `dr` from `voucher` `v` where ((`v`.`date` <= \'2022-04-30\') and ((`v`.`head` = \'23100\') or (`v`.`head` = \'23200\') or (`v`.`head` = \'23300\') or (`v`.`head` = \'23400\') or ((`v`.`head` = \'23500\') and (`v`.`head` = \'23600\')))) group by `v`.acc_no
client_cs_name=utf8
connection_cl_name=utf8_general_ci
view_body_utf8=select `v`.`date` AS `date`,`b`.`code` AS `acc_no`,`b`.`sub_head` AS `b_sub_head`,0 AS `cr`,0 AS `dr`,`b`.`loan_sub_head` AS `p_sub_head`,if(((`b`.`loan_sub_head` = \'23101A\') or (`b`.`loan_sub_head` = \'23101B\')),23100,\'\') AS `marge_teble`,sum(`v`.`cr`) AS `bcr`,sum(`v`.`dr`) AS `bdr` from (`co-operativebank-henria`.`borrowing` `b` join `co-operativebank-henria`.`voucher` `v`) where ((`v`.`sub_head` = `b`.`sub_head`) and (`v`.`Acc_no` = `b`.`code`)) group by `v`.`date`,`b`.`sub_head`,`b`.`date` union all select `v`.`date` AS `date`,`v`.`Acc_no` AS `acc_no`,`v`.`sub_head` AS `b_sub_head`,sum(`v`.`dr`) AS `cr`,sum(`v`.`cr`) AS `dr`,`v`.`sub_head` AS `p_sub_head`,if(((`v`.`sub_head` = \'23101A\') or (`v`.`sub_head` = \'23101B\')),23100,\'\') AS `marge_teble`,0 AS `cr`,0 AS `dr` from `co-operativebank-henria`.`voucher` `v` where ((`v`.`date` <= \'2022-04-30\') and ((`v`.`head` = \'23100\') or (`v`.`head` = \'23200\') or (`v`.`head` = \'23300\') or (`v`.`head` = \'23400\') or ((`v`.`head` = \'23500\') and (`v`.`head` = \'23600\')))) group by `v`.`Acc_no`
