TYPE=VIEW
query=select `ht`.`code` AS `code`,`ht`.`head_type` AS `head_type`,if(((`ht`.`code` <> \'22000\') and (`ht`.`code` <> \'28000\')),(sum(`v`.`dr`) - sum(`v`.`cr`)),(sum(`v`.`cr`) - sum(`v`.`dr`))) AS `bal` from `co-operativebank`.`voucher` `v` join `co-operativebank`.`sub_head` `sh` join `co-operativebank`.`head` `h` join `co-operativebank`.`head_type` `ht` where ((`v`.`sub_head` = `sh`.`code`) and (`sh`.`head` = `h`.`code`) and (`h`.`head_type` = `ht`.`code`) and (`v`.`sub_head` > \'20000\') and (`v`.`sub_head` < \'30000\') and (`v`.`date` < \'2016-04-01\')) group by `ht`.`code`
md5=77021b45400258d9b6f02ac0af67ee57
updatable=0
algorithm=0
definer_user=admin
definer_host=localhost
suid=2
with_check_option=0
timestamp=2017-05-05 01:31:16
create-version=1
source=select ht.code,ht.head_type,if(ht.code<>\'22000\'and ht.code<>\'28000\',sum(dr)-sum(cr),sum(cr)-sum(dr)) bal from voucher v,sub_head sh,head h,head_type ht where v.sub_head=sh.code and sh.head=h.code and h.head_type=ht.code and (v.sub_head>\'20000\' and v.sub_head<\'30000\') and date<\'2016-04-01\' group by ht.code
client_cs_name=latin1
connection_cl_name=latin1_swedish_ci
view_body_utf8=select `ht`.`code` AS `code`,`ht`.`head_type` AS `head_type`,if(((`ht`.`code` <> \'22000\') and (`ht`.`code` <> \'28000\')),(sum(`v`.`dr`) - sum(`v`.`cr`)),(sum(`v`.`cr`) - sum(`v`.`dr`))) AS `bal` from `co-operativebank`.`voucher` `v` join `co-operativebank`.`sub_head` `sh` join `co-operativebank`.`head` `h` join `co-operativebank`.`head_type` `ht` where ((`v`.`sub_head` = `sh`.`code`) and (`sh`.`head` = `h`.`code`) and (`h`.`head_type` = `ht`.`code`) and (`v`.`sub_head` > \'20000\') and (`v`.`sub_head` < \'30000\') and (`v`.`date` < \'2016-04-01\')) group by `ht`.`code`
