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-115`.`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-115`.`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-115`.`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-115`.`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-115`.`heads_voucher` `h` where ((`h`.`htcode` = \'14000\') and (`h`.`date` <= \'2017-03-31\')) group by `h`.`shcode`
md5=8ab01f5093d587b665c25091ecd2ae3c
updatable=0
algorithm=0
definer_user=admin
definer_host=localhost
suid=1
with_check_option=0
timestamp=2024-04-23 06:49:46
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-115`.`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-115`.`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-115`.`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-115`.`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-115`.`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-115`.`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-115`.`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-115`.`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-115`.`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-115`.`heads_voucher` `h` where ((`h`.`htcode` = \'14000\') and (`h`.`date` <= \'2017-03-31\')) group by `h`.`shcode`
