TYPE=VIEW
query=select (sum(`v`.`cr`) - sum(`v`.`dr`)) AS `opbal` from (`co-operativebank-dekhaliannapurna`.`voucher` `v` join `co-operativebank-dekhaliannapurna`.`head` `h`) where ((`v`.`head` = `h`.`code`) and (`v`.`deposit_type` = \'CASH\') and ((`h`.`head_type` = \'14000\') or (`h`.`head_type` = \'23000\')) and (`v`.`date` < \'2015-03-30\')) group by `v`.`head` union all select (sum(`v`.`cr`) - sum(`v`.`dr`)) AS `opbal` from (`co-operativebank-dekhaliannapurna`.`voucher` `v` join `co-operativebank-dekhaliannapurna`.`head` `h`) where ((`v`.`head` = `h`.`code`) and (`v`.`deposit_type` = \'CASH\') and (`h`.`head_type` <> \'28000\') and (`h`.`head_type` <> \'62000\') and (`h`.`head_type` <> \'20000\') and (`h`.`head_type` <> \'\') and ((`h`.`head_type` < \'50000\') or (`h`.`head_type` > \'60000\')) and (`v`.`date` < \'2015-03-30\')) group by `v`.`head` union all select (sum(`v`.`dr`) - sum(`v`.`cr`)) AS `opbal` from (`co-operativebank-dekhaliannapurna`.`voucher` `v` join `co-operativebank-dekhaliannapurna`.`head` `h`) where ((`v`.`head` = `h`.`code`) and (`v`.`deposit_type` = \'CASH\') and (`h`.`head_type` > \'50000\') and (`h`.`head_type` < \'60000\') and (`v`.`date` < \'2015-03-30\')) group by `v`.`head`
md5=b97c16d4a20f04a8ac33ad28cc18e5d9
updatable=0
algorithm=0
definer_user=admin
definer_host=%
suid=1
with_check_option=0
timestamp=2022-05-24 07:43:27
create-version=1
source=select ( sum(  `v`.`cr`  )  - sum(  `v`.`dr`  )  ) AS  `opbal`  from (  `co-operativebank-dekhaliannapurna`.`voucher`  `v`  join  `co-operativebank-dekhaliannapurna`.`head`  `h`  ) where ( (  `v`.`head`  =  `h`.`code`  ) and (  `v`.`deposit_type`  =  \'CASH\' ) and ( (  `h`.`head_type`  =  \'14000\' ) or (  `h`.`head_type`  =  \'23000\' ) ) and (  `v`.`date`  <  \'2015-03-30\' ) ) group  by  `v`.`head`  union  all  select ( sum(  `v`.`cr`  )  - sum(  `v`.`dr`  )  ) AS  `opbal`  from (  `co-operativebank-dekhaliannapurna`.`voucher`  `v`  join  `co-operativebank-dekhaliannapurna`.`head`  `h`  ) where ( (  `v`.`head`  =  `h`.`code`  ) and (  `v`.`deposit_type`  =  \'CASH\' ) and (  `h`.`head_type`  <>  \'28000\' ) and (  `h`.`head_type`  <>  \'62000\' ) and (  `h`.`head_type`  <>  \'20000\' ) and (  `h`.`head_type`  <>  \'\' ) and ( (  `h`.`head_type`  <  \'50000\' ) or (  `h`.`head_type`  >  \'60000\' ) ) and (  `v`.`date`  <  \'2015-03-30\' ) ) group  by  `v`.`head`  union  all  select ( sum(  `v`.`dr`  )  - sum(  `v`.`cr`  )  ) AS  `opbal`  from (  `co-operativebank-dekhaliannapurna`.`voucher`  `v`  join  `co-operativebank-dekhaliannapurna`.`head`  `h`  ) where ( (  `v`.`head`  =  `h`.`code`  ) and (  `v`.`deposit_type`  =  \'CASH\' ) and (  `h`.`head_type`  >  \'50000\' ) and (  `h`.`head_type`  <  \'60000\' ) and (  `v`.`date`  <  \'2015-03-30\' ) ) group  by  `v`.`head`
client_cs_name=utf8
connection_cl_name=utf8_general_ci
view_body_utf8=select (sum(`v`.`cr`) - sum(`v`.`dr`)) AS `opbal` from (`co-operativebank-dekhaliannapurna`.`voucher` `v` join `co-operativebank-dekhaliannapurna`.`head` `h`) where ((`v`.`head` = `h`.`code`) and (`v`.`deposit_type` = \'CASH\') and ((`h`.`head_type` = \'14000\') or (`h`.`head_type` = \'23000\')) and (`v`.`date` < \'2015-03-30\')) group by `v`.`head` union all select (sum(`v`.`cr`) - sum(`v`.`dr`)) AS `opbal` from (`co-operativebank-dekhaliannapurna`.`voucher` `v` join `co-operativebank-dekhaliannapurna`.`head` `h`) where ((`v`.`head` = `h`.`code`) and (`v`.`deposit_type` = \'CASH\') and (`h`.`head_type` <> \'28000\') and (`h`.`head_type` <> \'62000\') and (`h`.`head_type` <> \'20000\') and (`h`.`head_type` <> \'\') and ((`h`.`head_type` < \'50000\') or (`h`.`head_type` > \'60000\')) and (`v`.`date` < \'2015-03-30\')) group by `v`.`head` union all select (sum(`v`.`dr`) - sum(`v`.`cr`)) AS `opbal` from (`co-operativebank-dekhaliannapurna`.`voucher` `v` join `co-operativebank-dekhaliannapurna`.`head` `h`) where ((`v`.`head` = `h`.`code`) and (`v`.`deposit_type` = \'CASH\') and (`h`.`head_type` > \'50000\') and (`h`.`head_type` < \'60000\') and (`v`.`date` < \'2015-03-30\')) group by `v`.`head`
