TYPE=VIEW
query=select `h`.`shcode` AS `shcode`,`h`.`sub_head` AS `sub_head`,round((select (sum(`h1`.`cr`) - sum(`h1`.`dr`)) from `co-operativebank-durgapur`.`heads_voucher` `h1` where ((`h1`.`shcode` = `h`.`shcode`) and (`h1`.`htcode` = \'14000\') and (`h1`.`date` < \'2016-04-01\')) group by `h1`.`shcode`),0) AS `Opening`,round((select sum(`h1`.`cr`) from `co-operativebank-durgapur`.`heads_voucher` `h1` where ((`h1`.`shcode` = `h`.`shcode`) and (`h1`.`htcode` = \'14000\') and (`h1`.`date` >= \'2016-04-01\') and (`h1`.`date` <= \'2017-03-31\')) group by `h1`.`shcode`),0) AS `received`,round((select sum(`h1`.`dr`) from `co-operativebank-durgapur`.`heads_voucher` `h1` where ((`h1`.`shcode` = `h`.`shcode`) and (`h1`.`htcode` = \'14000\') and (`h1`.`date` >= \'2016-04-01\') and (`h1`.`date` <= \'2017-03-31\')) group by `h1`.`shcode`),0) AS `refund`,(select count(0) from `co-operativebank-durgapur`.`deposit_acc` `d` where ((`d`.`sub_head` = `h`.`shcode`) and (`d`.`date_open` >= \'2016-04-01\') and (`d`.`date_open` <= \'2017-03-31\'))) AS `total_no_acc`,sum(0) AS `sum(0)` from `co-operativebank-durgapur`.`heads_voucher` `h` where ((`h`.`htcode` = \'14000\') and (`h`.`date` <= \'2017-03-31\')) group by `h`.`shcode`
md5=034617f2f930a19e0f5d931c37c43c0c
updatable=0
algorithm=0
definer_user=admin
definer_host=localhost
suid=1
with_check_option=0
timestamp=2022-04-04 10:26:53
create-version=1
source=select  `h`.`shcode`  AS  `shcode` ,\n `h`.`sub_head`  AS  `sub_head` ,\nround( (  select ( sum(  `h1`.`cr`  )  - sum(  `h1`.`dr`  )  )  from  `co-operativebank-durgapur`.`heads_voucher`  `h1`  where ( (  `h1`.`shcode`  =  `h`.`shcode`  ) and (  `h1`.`htcode`  =  \'14000\' ) and (  `h1`.`date`  <  \'2016-04-01\' ) ) group  by  `h1`.`shcode`  ),\n0 ) AS  `Opening` ,\nround( (  select sum(  `h1`.`cr`  )  from  `co-operativebank-durgapur`.`heads_voucher`  `h1`  where ( (  `h1`.`shcode`  =  `h`.`shcode`  ) and (  `h1`.`htcode`  =  \'14000\' ) and (  `h1`.`date`  >=  \'2016-04-01\' ) and (  `h1`.`date`  <=  \'2017-03-31\' ) )  group  by  `h1`.`shcode`  ),\n0 ) AS  `received` ,\nround( (  select sum(  `h1`.`dr`  )  from  `co-operativebank-durgapur`.`heads_voucher`  `h1`  where ( (  `h1`.`shcode`  =  `h`.`shcode`  ) and (  `h1`.`htcode`  =  \'14000\' ) and (  `h1`.`date`  >=  \'2016-04-01\' ) and (  `h1`.`date`  <=  \'2017-03-31\' ) )  group  by  `h1`.`shcode`  ),\n0 ) AS  `refund` ,\n(  select count( 0  )  from  `co-operativebank-durgapur`.`deposit_acc`  `d`  where ( (  `d`.`sub_head`  =  `h`.`shcode`  ) and (  `d`.`date_open`  >=  \'2016-04-01\' ) and (  `d`.`date_open`  <=  \'2017-03-31\' ) ) ) AS  `total_no_acc` ,\nsum( 0  )  AS  `sum(0)`  from  `co-operativebank-durgapur`.`heads_voucher`  `h`  where ( (  `h`.`htcode`  =  \'14000\' ) and (  `h`.`date`  <=  \'2017-03-31\' ) ) group  by  `h`.`shcode`
client_cs_name=utf8
connection_cl_name=utf8_general_ci
view_body_utf8=select `h`.`shcode` AS `shcode`,`h`.`sub_head` AS `sub_head`,round((select (sum(`h1`.`cr`) - sum(`h1`.`dr`)) from `co-operativebank-durgapur`.`heads_voucher` `h1` where ((`h1`.`shcode` = `h`.`shcode`) and (`h1`.`htcode` = \'14000\') and (`h1`.`date` < \'2016-04-01\')) group by `h1`.`shcode`),0) AS `Opening`,round((select sum(`h1`.`cr`) from `co-operativebank-durgapur`.`heads_voucher` `h1` where ((`h1`.`shcode` = `h`.`shcode`) and (`h1`.`htcode` = \'14000\') and (`h1`.`date` >= \'2016-04-01\') and (`h1`.`date` <= \'2017-03-31\')) group by `h1`.`shcode`),0) AS `received`,round((select sum(`h1`.`dr`) from `co-operativebank-durgapur`.`heads_voucher` `h1` where ((`h1`.`shcode` = `h`.`shcode`) and (`h1`.`htcode` = \'14000\') and (`h1`.`date` >= \'2016-04-01\') and (`h1`.`date` <= \'2017-03-31\')) group by `h1`.`shcode`),0) AS `refund`,(select count(0) from `co-operativebank-durgapur`.`deposit_acc` `d` where ((`d`.`sub_head` = `h`.`shcode`) and (`d`.`date_open` >= \'2016-04-01\') and (`d`.`date_open` <= \'2017-03-31\'))) AS `total_no_acc`,sum(0) AS `sum(0)` from `co-operativebank-durgapur`.`heads_voucher` `h` where ((`h`.`htcode` = \'14000\') and (`h`.`date` <= \'2017-03-31\')) group by `h`.`shcode`
