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-keshabchak`.`borrowing` `b` join `co-operativebank-keshabchak`.`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-keshabchak`.`voucher` `v` where ((`v`.`date` <= \'2024-03-31\') 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`.`sub_head`,`v`.`date`
md5=936ad490877f52dd6eff3da235675096
updatable=0
algorithm=0
definer_user=root
definer_host=localhost
suid=1
with_check_option=0
timestamp=2024-04-19 11:09:38
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` <= \'2024-03-31\') 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`.`sub_head`,v.date
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-keshabchak`.`borrowing` `b` join `co-operativebank-keshabchak`.`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-keshabchak`.`voucher` `v` where ((`v`.`date` <= \'2024-03-31\') 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`.`sub_head`,`v`.`date`
