TYPE=VIEW
query=select `v1`.`no` AS `no`,if((`v1`.`Acc_no` = \'\'),`v1`.`cash_acc`,`v1`.`Acc_no`) AS `acc_no`,`an`.`name` AS `name`,`an`.`lfno` AS `lfno`,sum(`v1`.`cr`) AS `CASH`,\'0\' AS `TRAN`,`v1`.`date` AS `date`,`v1`.`sub_head` AS `sub_head` from (`co-operativebank-242`.`voucher` `v1` USE INDEX (`by_sub_head`) USE INDEX (`by_date`) USE INDEX (`by_cash_acc`) USE INDEX (`by_acc_no`) join `co-operativebank-242`.`quick_name` `an` USE INDEX (`by_acc_no`)) where (((`v1`.`Acc_no` = `an`.`acc_no`) or (`v1`.`cash_acc` = `an`.`acc_no`)) and (`v1`.`sub_head` > 57000) and (`v1`.`sub_head` <= 57999) and (`v1`.`sub_head` = \'57907\') and (`v1`.`date` = \'2022-10-31\') and (`v1`.`deposit_type` = \'CASH\') and (`v1`.`cr` <> \'0\')) group by if((`v1`.`Acc_no` = \'\'),`v1`.`cash_acc`,`v1`.`Acc_no`) union all select `v1`.`no` AS `no`,if((`v1`.`Acc_no` = \'\'),`v1`.`cash_acc`,`v1`.`Acc_no`) AS `acc_no`,`an`.`name` AS `name`,`an`.`lfno` AS `lfno`,\'0\' AS `CASH`,sum(`v1`.`cr`) AS `TRAN`,`v1`.`date` AS `date`,`v1`.`sub_head` AS `sub_head` from (`co-operativebank-242`.`voucher` `v1` USE INDEX (`by_sub_head`) USE INDEX (`by_date`) USE INDEX (`by_cash_acc`) USE INDEX (`by_acc_no`) join `co-operativebank-242`.`quick_name` `an` USE INDEX (`by_acc_no`)) where (((`v1`.`Acc_no` = `an`.`acc_no`) or (`v1`.`cash_acc` = `an`.`acc_no`)) and (`v1`.`sub_head` > 57000) and (`v1`.`sub_head` <= 57999) and (`v1`.`sub_head` = \'57907\') and (`v1`.`date` = \'2022-10-31\') and (`v1`.`deposit_type` = \'TRANSFER\') and (`v1`.`cr` <> \'0\')) group by if((`v1`.`Acc_no` = \'\'),`v1`.`cash_acc`,`v1`.`Acc_no`)
md5=81ae52da9633f8f18c41bf990e96da96
updatable=0
algorithm=0
definer_user=admin
definer_host=%
suid=1
with_check_option=0
timestamp=2025-09-15 05:24:29
create-version=1
source=select  `v1`.`no`  AS  `no` ,\nif( (  `v1`.`Acc_no`  =  \'\' ),  `v1`.`cash_acc` ,  `v1`.`Acc_no`  )  AS  `acc_no` ,\n `an`.`name`  AS  `name` ,\n `an`.`lfno`  AS  `lfno` ,\nsum(  `v1`.`cr`  )  AS  `CASH` ,\n \'0\' AS  `TRAN` ,\n `v1`.`date`  AS  `date` ,\n `v1`.`sub_head`  AS  `sub_head`  from (  `co-operativebank-242`.`voucher`  `v1`  USE  INDEX (  `by_acc_no`  )  USE  INDEX (  `by_cash_acc`  )  USE  INDEX (  `by_date`  )  USE  INDEX (  `by_sub_head`  )  join  `co-operativebank-242`.`quick_name`  `an`  USE  INDEX (  `by_acc_no`  )  ) where ( ( (  `v1`.`Acc_no`  =  `an`.`acc_no`  ) or (  `v1`.`cash_acc`  =  `an`.`acc_no`  ) ) and (  `v1`.`sub_head`  >57000 ) and (  `v1`.`sub_head`  <=57999 ) and (  `v1`.`sub_head`  =  \'57907\' ) and (  `v1`.`date`  =  \'2022-10-31\' ) and (  `v1`.`deposit_type`  =  \'CASH\' ) and (  `v1`.`cr`  <>  \'0\' ) ) group  by if( (  `v1`.`Acc_no`  =  \'\' ),  `v1`.`cash_acc` ,  `v1`.`Acc_no`  )  union  all  select  `v1`.`no`  AS  `no` ,\nif( (  `v1`.`Acc_no`  =  \'\' ),  `v1`.`cash_acc` ,  `v1`.`Acc_no`  )  AS  `acc_no` ,\n `an`.`name`  AS  `name` ,\n `an`.`lfno`  AS  `lfno` ,\n \'0\' AS  `CASH` ,\nsum(  `v1`.`cr`  )  AS  `TRAN` ,\n `v1`.`date`  AS  `date` ,\n `v1`.`sub_head`  AS  `sub_head`  from (  `co-operativebank-242`.`voucher`  `v1`  USE  INDEX (  `by_acc_no`  )  USE  INDEX (  `by_cash_acc`  )  USE  INDEX (  `by_date`  )  USE  INDEX (  `by_sub_head`  )  join  `co-operativebank-242`.`quick_name`  `an`  USE  INDEX (  `by_acc_no`  )  ) where ( ( (  `v1`.`Acc_no`  =  `an`.`acc_no`  ) or (  `v1`.`cash_acc`  =  `an`.`acc_no`  ) ) and (  `v1`.`sub_head`  >57000 ) and (  `v1`.`sub_head`  <=57999 ) and (  `v1`.`sub_head`  =  \'57907\' ) and (  `v1`.`date`  =  \'2022-10-31\' ) and (  `v1`.`deposit_type`  =  \'TRANSFER\' ) and (  `v1`.`cr`  <>  \'0\' ) ) group  by if( (  `v1`.`Acc_no`  =  \'\' ),  `v1`.`cash_acc` ,  `v1`.`Acc_no`  )
client_cs_name=utf8
connection_cl_name=utf8_general_ci
view_body_utf8=select `v1`.`no` AS `no`,if((`v1`.`Acc_no` = \'\'),`v1`.`cash_acc`,`v1`.`Acc_no`) AS `acc_no`,`an`.`name` AS `name`,`an`.`lfno` AS `lfno`,sum(`v1`.`cr`) AS `CASH`,\'0\' AS `TRAN`,`v1`.`date` AS `date`,`v1`.`sub_head` AS `sub_head` from (`co-operativebank-242`.`voucher` `v1` USE INDEX (`by_sub_head`) USE INDEX (`by_date`) USE INDEX (`by_cash_acc`) USE INDEX (`by_acc_no`) join `co-operativebank-242`.`quick_name` `an` USE INDEX (`by_acc_no`)) where (((`v1`.`Acc_no` = `an`.`acc_no`) or (`v1`.`cash_acc` = `an`.`acc_no`)) and (`v1`.`sub_head` > 57000) and (`v1`.`sub_head` <= 57999) and (`v1`.`sub_head` = \'57907\') and (`v1`.`date` = \'2022-10-31\') and (`v1`.`deposit_type` = \'CASH\') and (`v1`.`cr` <> \'0\')) group by if((`v1`.`Acc_no` = \'\'),`v1`.`cash_acc`,`v1`.`Acc_no`) union all select `v1`.`no` AS `no`,if((`v1`.`Acc_no` = \'\'),`v1`.`cash_acc`,`v1`.`Acc_no`) AS `acc_no`,`an`.`name` AS `name`,`an`.`lfno` AS `lfno`,\'0\' AS `CASH`,sum(`v1`.`cr`) AS `TRAN`,`v1`.`date` AS `date`,`v1`.`sub_head` AS `sub_head` from (`co-operativebank-242`.`voucher` `v1` USE INDEX (`by_sub_head`) USE INDEX (`by_date`) USE INDEX (`by_cash_acc`) USE INDEX (`by_acc_no`) join `co-operativebank-242`.`quick_name` `an` USE INDEX (`by_acc_no`)) where (((`v1`.`Acc_no` = `an`.`acc_no`) or (`v1`.`cash_acc` = `an`.`acc_no`)) and (`v1`.`sub_head` > 57000) and (`v1`.`sub_head` <= 57999) and (`v1`.`sub_head` = \'57907\') and (`v1`.`date` = \'2022-10-31\') and (`v1`.`deposit_type` = \'TRANSFER\') and (`v1`.`cr` <> \'0\')) group by if((`v1`.`Acc_no` = \'\'),`v1`.`cash_acc`,`v1`.`Acc_no`)
