TYPE=VIEW
query=select `co-operativebank-mitrachak`.`voucher`.`sub_head` AS `sub_head`,`co-operativebank-mitrachak`.`head`.`code` AS `code`,`co-operativebank-mitrachak`.`head_type`.`code` AS `head_type`,(sum(`co-operativebank-mitrachak`.`voucher`.`dr`) - sum(`co-operativebank-mitrachak`.`voucher`.`cr`)) AS `bal` from (((`co-operativebank-mitrachak`.`voucher` join `co-operativebank-mitrachak`.`sub_head`) join `co-operativebank-mitrachak`.`head`) join `co-operativebank-mitrachak`.`head_type`) where ((`co-operativebank-mitrachak`.`voucher`.`sub_head` = `co-operativebank-mitrachak`.`sub_head`.`code`) and (`co-operativebank-mitrachak`.`sub_head`.`head` = `co-operativebank-mitrachak`.`head`.`code`) and (`co-operativebank-mitrachak`.`head`.`head_type` = `co-operativebank-mitrachak`.`head_type`.`code`) and (((`co-operativebank-mitrachak`.`voucher`.`sub_head` > \'60000\') and (`co-operativebank-mitrachak`.`voucher`.`sub_head` < \'70000\')) or (`co-operativebank-mitrachak`.`head_type`.`code` = \'23000\') or (`co-operativebank-mitrachak`.`head_type`.`code` = \'21000\')) and (`co-operativebank-mitrachak`.`voucher`.`date` < \'2015-03-31\')) group by `co-operativebank-mitrachak`.`voucher`.`sub_head` union all select `co-operativebank-mitrachak`.`voucher`.`sub_head` AS `sub_head`,`co-operativebank-mitrachak`.`head`.`code` AS `code`,`co-operativebank-mitrachak`.`head_type`.`code` AS `head_type`,(sum(`co-operativebank-mitrachak`.`voucher`.`cr`) - sum(`co-operativebank-mitrachak`.`voucher`.`dr`)) AS `(sum(cr)-sum(dr))` from (((`co-operativebank-mitrachak`.`voucher` join `co-operativebank-mitrachak`.`sub_head`) join `co-operativebank-mitrachak`.`head`) join `co-operativebank-mitrachak`.`head_type`) where ((`co-operativebank-mitrachak`.`voucher`.`sub_head` = `co-operativebank-mitrachak`.`sub_head`.`code`) and (`co-operativebank-mitrachak`.`sub_head`.`head` = `co-operativebank-mitrachak`.`head`.`code`) and (`co-operativebank-mitrachak`.`head`.`head_type` = `co-operativebank-mitrachak`.`head_type`.`code`) and (`co-operativebank-mitrachak`.`voucher`.`date` < \'2015-03-31\') and ((`co-operativebank-mitrachak`.`head_type`.`code` = \'22000\') or (`co-operativebank-mitrachak`.`head_type`.`code` = \'28000\'))) group by `co-operativebank-mitrachak`.`voucher`.`sub_head`
md5=8a8d100a933421dab125a86e7cdb7fc7
updatable=0
algorithm=0
definer_user=admin
definer_host=localhost
suid=1
with_check_option=0
timestamp=2019-05-30 04:21:30
create-version=1
source=select  `co-operativebank-mitrachak`.`voucher`.`sub_head`  AS  `sub_head` ,\n `co-operativebank-mitrachak`.`head`.`code`  AS  `code` ,\n `co-operativebank-mitrachak`.`head_type`.`code`  AS  `head_type` ,\n( sum(  `co-operativebank-mitrachak`.`voucher`.`dr`  )  - sum(  `co-operativebank-mitrachak`.`voucher`.`cr`  )  ) AS  `bal`  from ( ( (  `co-operativebank-mitrachak`.`voucher`  join  `co-operativebank-mitrachak`.`sub_head`  ) join  `co-operativebank-mitrachak`.`head`  ) join  `co-operativebank-mitrachak`.`head_type`  ) where ( (  `co-operativebank-mitrachak`.`voucher`.`sub_head`  =  `co-operativebank-mitrachak`.`sub_head`.`code`  ) and (  `co-operativebank-mitrachak`.`sub_head`.`head`  =  `co-operativebank-mitrachak`.`head`.`code`  ) and (  `co-operativebank-mitrachak`.`head`.`head_type`  =  `co-operativebank-mitrachak`.`head_type`.`code`  ) and ( ( (  `co-operativebank-mitrachak`.`voucher`.`sub_head`  >  \'60000\' ) and (  `co-operativebank-mitrachak`.`voucher`.`sub_head`  <  \'70000\' ) ) or (  `co-operativebank-mitrachak`.`head_type`.`code`  =  \'23000\' ) or (  `co-operativebank-mitrachak`.`head_type`.`code`  =  \'21000\' ) ) and (  `co-operativebank-mitrachak`.`voucher`.`date`  <  \'2015-03-31\' ) ) group  by  `co-operativebank-mitrachak`.`voucher`.`sub_head`  union  all  select  `co-operativebank-mitrachak`.`voucher`.`sub_head`  AS  `sub_head` ,\n `co-operativebank-mitrachak`.`head`.`code`  AS  `code` ,\n `co-operativebank-mitrachak`.`head_type`.`code`  AS  `head_type` ,\n( sum(  `co-operativebank-mitrachak`.`voucher`.`cr`  )  - sum(  `co-operativebank-mitrachak`.`voucher`.`dr`  )  ) AS  `(sum(cr)-sum(dr))`  from ( ( (  `co-operativebank-mitrachak`.`voucher`  join  `co-operativebank-mitrachak`.`sub_head`  ) join  `co-operativebank-mitrachak`.`head`  ) join  `co-operativebank-mitrachak`.`head_type`  ) where ( (  `co-operativebank-mitrachak`.`voucher`.`sub_head`  =  `co-operativebank-mitrachak`.`sub_head`.`code`  ) and (  `co-operativebank-mitrachak`.`sub_head`.`head`  =  `co-operativebank-mitrachak`.`head`.`code`  ) and (  `co-operativebank-mitrachak`.`head`.`head_type`  =  `co-operativebank-mitrachak`.`head_type`.`code`  ) and (  `co-operativebank-mitrachak`.`voucher`.`date`  <  \'2015-03-31\' ) and ( (  `co-operativebank-mitrachak`.`head_type`.`code`  =  \'22000\' ) or (  `co-operativebank-mitrachak`.`head_type`.`code`  =  \'28000\' ) ) ) group  by  `co-operativebank-mitrachak`.`voucher`.`sub_head`
client_cs_name=utf8
connection_cl_name=utf8_general_ci
view_body_utf8=select `co-operativebank-mitrachak`.`voucher`.`sub_head` AS `sub_head`,`co-operativebank-mitrachak`.`head`.`code` AS `code`,`co-operativebank-mitrachak`.`head_type`.`code` AS `head_type`,(sum(`co-operativebank-mitrachak`.`voucher`.`dr`) - sum(`co-operativebank-mitrachak`.`voucher`.`cr`)) AS `bal` from (((`co-operativebank-mitrachak`.`voucher` join `co-operativebank-mitrachak`.`sub_head`) join `co-operativebank-mitrachak`.`head`) join `co-operativebank-mitrachak`.`head_type`) where ((`co-operativebank-mitrachak`.`voucher`.`sub_head` = `co-operativebank-mitrachak`.`sub_head`.`code`) and (`co-operativebank-mitrachak`.`sub_head`.`head` = `co-operativebank-mitrachak`.`head`.`code`) and (`co-operativebank-mitrachak`.`head`.`head_type` = `co-operativebank-mitrachak`.`head_type`.`code`) and (((`co-operativebank-mitrachak`.`voucher`.`sub_head` > \'60000\') and (`co-operativebank-mitrachak`.`voucher`.`sub_head` < \'70000\')) or (`co-operativebank-mitrachak`.`head_type`.`code` = \'23000\') or (`co-operativebank-mitrachak`.`head_type`.`code` = \'21000\')) and (`co-operativebank-mitrachak`.`voucher`.`date` < \'2015-03-31\')) group by `co-operativebank-mitrachak`.`voucher`.`sub_head` union all select `co-operativebank-mitrachak`.`voucher`.`sub_head` AS `sub_head`,`co-operativebank-mitrachak`.`head`.`code` AS `code`,`co-operativebank-mitrachak`.`head_type`.`code` AS `head_type`,(sum(`co-operativebank-mitrachak`.`voucher`.`cr`) - sum(`co-operativebank-mitrachak`.`voucher`.`dr`)) AS `(sum(cr)-sum(dr))` from (((`co-operativebank-mitrachak`.`voucher` join `co-operativebank-mitrachak`.`sub_head`) join `co-operativebank-mitrachak`.`head`) join `co-operativebank-mitrachak`.`head_type`) where ((`co-operativebank-mitrachak`.`voucher`.`sub_head` = `co-operativebank-mitrachak`.`sub_head`.`code`) and (`co-operativebank-mitrachak`.`sub_head`.`head` = `co-operativebank-mitrachak`.`head`.`code`) and (`co-operativebank-mitrachak`.`head`.`head_type` = `co-operativebank-mitrachak`.`head_type`.`code`) and (`co-operativebank-mitrachak`.`voucher`.`date` < \'2015-03-31\') and ((`co-operativebank-mitrachak`.`head_type`.`code` = \'22000\') or (`co-operativebank-mitrachak`.`head_type`.`code` = \'28000\'))) group by `co-operativebank-mitrachak`.`voucher`.`sub_head`
