TYPE=VIEW
query=select `h`.`code` AS `code`,`h`.`head` AS `HEAD_TEXT`,sum(`v`.`cr`) AS `CR`,sum(`v`.`dr`) AS `DR`,(sum(`v`.`cr`) - sum(`v`.`dr`)) AS `opbal`,`v`.`head` AS `head`,`ht`.`code` AS `htcode` from ((`co-operativebank-kutubpur`.`voucher` `v` join `co-operativebank-kutubpur`.`head` `h`) join `co-operativebank-kutubpur`.`head_type` `ht`) where ((`ht`.`code` = `h`.`head_type`) and (`ht`.`code` <> 28000) and (`ht`.`code` <> 22000) and (`v`.`head` = `h`.`code`) and (`v`.`date` < \'2017-04-01\')) group by `ht`.`code` union all select `h`.`code` AS `code`,`h`.`head` AS `HEAD_TEXT`,sum(`v`.`dr`) AS `CR`,sum(`v`.`cr`) AS `DR`,(sum(`v`.`dr`) - sum(`v`.`cr`)) AS `opbal`,`v`.`head` AS `head`,`ht`.`code` AS `htcode` from ((`co-operativebank-kutubpur`.`voucher` `v` join `co-operativebank-kutubpur`.`head` `h`) join `co-operativebank-kutubpur`.`head_type` `ht`) where ((`ht`.`code` = `h`.`head_type`) and (`ht`.`code` = \'28000\') and (`ht`.`code` = \'22000\') and (`v`.`head` = `h`.`code`) and (`v`.`date` < \'2017-04-01\')) group by `ht`.`code`
md5=1f180de1ed23484c8be29f024eb0c91e
updatable=0
algorithm=0
definer_user=admin
definer_host=localhost
suid=1
with_check_option=0
timestamp=2021-08-20 14:29:00
create-version=1
source=select  `h`.`code`  AS  `code` ,\n `h`.`head`  AS  `HEAD_TEXT` ,\nsum(  `v`.`cr`  )  AS  `CR` ,\nsum(  `v`.`dr`  )  AS  `DR` ,\n( sum(  `v`.`cr`  )  - sum(  `v`.`dr`  )  ) AS  `opbal` ,\n `v`.`head`  AS  `head` ,\n `ht`.`code`  AS  `htcode`  from ( (  `co-operativebank-kutubpur`.`voucher`  `v`  join  `co-operativebank-kutubpur`.`head`  `h`  ) join  `co-operativebank-kutubpur`.`head_type`  `ht`  ) where ( (  `ht`.`code`  =  `h`.`head_type`  ) and (  `ht`.`code`  <>28000 ) and (  `ht`.`code`  <>22000 ) and (  `v`.`head`  =  `h`.`code`  ) and (  `v`.`date`  <  \'2017-04-01\' ) ) group  by  `ht`.`code`  union  all  select  `h`.`code`  AS  `code` ,\n `h`.`head`  AS  `HEAD_TEXT` ,\nsum(  `v`.`dr`  )  AS  `CR` ,\nsum(  `v`.`cr`  )  AS  `DR` ,\n( sum(  `v`.`dr`  )  - sum(  `v`.`cr`  )  ) AS  `opbal` ,\n `v`.`head`  AS  `head` ,\n `ht`.`code`  AS  `htcode`  from ( (  `co-operativebank-kutubpur`.`voucher`  `v`  join  `co-operativebank-kutubpur`.`head`  `h`  ) join  `co-operativebank-kutubpur`.`head_type`  `ht`  ) where ( (  `ht`.`code`  =  `h`.`head_type`  ) and (  `ht`.`code`  =  \'28000\' ) and (  `ht`.`code`  =  \'22000\' ) and (  `v`.`head`  =  `h`.`code`  ) and (  `v`.`date`  <  \'2017-04-01\' ) ) group  by  `ht`.`code`
client_cs_name=utf8
connection_cl_name=utf8_general_ci
view_body_utf8=select `h`.`code` AS `code`,`h`.`head` AS `HEAD_TEXT`,sum(`v`.`cr`) AS `CR`,sum(`v`.`dr`) AS `DR`,(sum(`v`.`cr`) - sum(`v`.`dr`)) AS `opbal`,`v`.`head` AS `head`,`ht`.`code` AS `htcode` from ((`co-operativebank-kutubpur`.`voucher` `v` join `co-operativebank-kutubpur`.`head` `h`) join `co-operativebank-kutubpur`.`head_type` `ht`) where ((`ht`.`code` = `h`.`head_type`) and (`ht`.`code` <> 28000) and (`ht`.`code` <> 22000) and (`v`.`head` = `h`.`code`) and (`v`.`date` < \'2017-04-01\')) group by `ht`.`code` union all select `h`.`code` AS `code`,`h`.`head` AS `HEAD_TEXT`,sum(`v`.`dr`) AS `CR`,sum(`v`.`cr`) AS `DR`,(sum(`v`.`dr`) - sum(`v`.`cr`)) AS `opbal`,`v`.`head` AS `head`,`ht`.`code` AS `htcode` from ((`co-operativebank-kutubpur`.`voucher` `v` join `co-operativebank-kutubpur`.`head` `h`) join `co-operativebank-kutubpur`.`head_type` `ht`) where ((`ht`.`code` = `h`.`head_type`) and (`ht`.`code` = \'28000\') and (`ht`.`code` = \'22000\') and (`v`.`head` = `h`.`code`) and (`v`.`date` < \'2017-04-01\')) group by `ht`.`code`
