TYPE=VIEW
query=(select `synop_details`.`no` AS `no`,`synop_details`.`slno` AS `slno`,`synop_details`.`sl_no` AS `sl_no`,concat(`synop_details`.`sub_head`,\' | \',`synop_details`.`account`) AS `account`,`synop_details`.`BalanceSheetFigure` AS `BalanceSheetFigure`,`synop_details`.`DetailList` AS `DetailList`,if((sum(`synop_details`.`BalanceSheetFigure`) > sum(`synop_details`.`DetailList`)),concat(\'[-] \',(sum(`synop_details`.`BalanceSheetFigure`) - sum(`synop_details`.`DetailList`))),concat(\'[+] \',(sum(`synop_details`.`DetailList`) - sum(`synop_details`.`BalanceSheetFigure`)))) AS `Descrepancy`,`synop_details`.`OverduePrin` AS `OverduePrin`,`synop_details`.`Interest` AS `Interest`,`synop_details`.`OverdueInt` AS `OverdueInt`,`synop_details`.`sub_head` AS `sub_head`,`synop_details`.`pay_re` AS `pay_rec` from `co-operativebank-henria`.`synop_details` where (`synop_details`.`slno` = 4) group by `synop_details`.`sub_head`) union (select `synop_details`.`no` AS `no`,`synop_details`.`slno` AS `slno`,`synop_details`.`sl_no` AS `sl_no`,concat(`synop_details`.`sub_head`,\' | \',`synop_details`.`account`) AS `account`,`synop_details`.`BalanceSheetFigure` AS `BalanceSheetFigure`,`synop_details`.`DetailList` AS `DetailList`,if((sum(`synop_details`.`BalanceSheetFigure`) > sum(`synop_details`.`DetailList`)),concat(\'[-] \',(sum(`synop_details`.`BalanceSheetFigure`) - sum(`synop_details`.`DetailList`))),concat(\'[+] \',(sum(`synop_details`.`DetailList`) - sum(`synop_details`.`BalanceSheetFigure`)))) AS `Descrepancy`,`synop_details`.`OverduePrin` AS `OverduePrin`,`synop_details`.`Interest` AS `Interest`,`synop_details`.`OverdueInt` AS `OverdueInt`,`synop_details`.`sub_head` AS `sub_head`,`synop_details`.`pay_re` AS `pay_rec` from `co-operativebank-henria`.`synop_details` where ((`synop_details`.`sl_no` = 4) and (`synop_details`.`slno` <> 4) and (`synop_details`.`sub_head` like \'28%\')) group by `synop_details`.`sub_head` order by `sl_no`,`sub_head`) union (select `synop_details`.`no` AS `no`,`synop_details`.`slno` AS `slno`,`synop_details`.`sl_no` AS `sl_no`,concat(`synop_details`.`sub_head`,\' | \',`synop_details`.`account`) AS `account`,`synop_details`.`BalanceSheetFigure` AS `BalanceSheetFigure`,`synop_details`.`DetailList` AS `DetailList`,if((sum(`synop_details`.`BalanceSheetFigure`) > sum(`synop_details`.`DetailList`)),concat(\'[-] \',(sum(`synop_details`.`BalanceSheetFigure`) - sum(`synop_details`.`DetailList`))),concat(\'[+] \',(sum(`synop_details`.`DetailList`) - sum(`synop_details`.`BalanceSheetFigure`)))) AS `Descrepancy`,`synop_details`.`OverduePrin` AS `OverduePrin`,`synop_details`.`Interest` AS `Interest`,`synop_details`.`OverdueInt` AS `OverdueInt`,`synop_details`.`sub_head` AS `sub_head`,`synop_details`.`pay_re` AS `pay_rec` from `co-operativebank-henria`.`synop_details` where ((`synop_details`.`sl_no` = 4) and (`synop_details`.`slno` <> 4) and (not((`synop_details`.`sub_head` like \'28%\')))) group by `synop_details`.`sub_head` order by `synop_details`.`sl_no`,`sub_head`)
md5=8c32e0b7b211586f2ee2c788715c4b1d
updatable=0
algorithm=0
definer_user=root
definer_host=localhost
suid=2
with_check_option=0
timestamp=2023-08-28 12:02:43
create-version=1
source=(select no,`slno`, `sl_no`, concat(sub_head,\' | \',`account`) as  `account`, `BalanceSheetFigure`, `DetailList`, if(sum(BalanceSheetFigure)>sum(DetailList),concat (\'[-] \',  sum(BalanceSheetFigure)-sum(DetailList)),concat (\'[+] \', sum(DetailList)-sum(BalanceSheetFigure))) as Descrepancy , `OverduePrin`, `Interest`, `OverdueInt`, `sub_head`,pay_re as pay_rec  FROM `synop_details` where slno=4  group by sub_head) union  
\n(select no,`slno`, `sl_no`, concat(sub_head,\' | \',`account`) as  `account`, `BalanceSheetFigure`, `DetailList`, if(sum(BalanceSheetFigure)>sum(DetailList),concat (\'[-] \',  sum(BalanceSheetFigure)-sum(DetailList)),concat (\'[+] \', sum(DetailList)-sum(BalanceSheetFigure))) as Descrepancy , `OverduePrin`, `Interest`, `OverdueInt`, `sub_head`,pay_re as pay_rec  FROM `synop_details` where sl_no=4 and slno<>4 and sub_head  LIKE \'28%\' group by sub_head ORDER BY `sl_no`,sub_head ASC)
\nunion
\n(select no,`slno`, `sl_no`, concat(sub_head,\' | \',`account`) as  `account`, `BalanceSheetFigure`, `DetailList`, if(sum(BalanceSheetFigure)>sum(DetailList),concat (\'[-] \',  sum(BalanceSheetFigure)-sum(DetailList)),concat (\'[+] \', sum(DetailList)-sum(BalanceSheetFigure))) as Descrepancy , `OverduePrin`, `Interest`, `OverdueInt`, `sub_head`,pay_re as pay_rec  FROM `synop_details` where sl_no=4 and slno<>4 and sub_head NOT LIKE \'28%\' group by sub_head ORDER BY `synop_details`.`sl_no`,sub_head ASC)
client_cs_name=utf8
connection_cl_name=utf8_general_ci
view_body_utf8=(select `synop_details`.`no` AS `no`,`synop_details`.`slno` AS `slno`,`synop_details`.`sl_no` AS `sl_no`,concat(`synop_details`.`sub_head`,\' | \',`synop_details`.`account`) AS `account`,`synop_details`.`BalanceSheetFigure` AS `BalanceSheetFigure`,`synop_details`.`DetailList` AS `DetailList`,if((sum(`synop_details`.`BalanceSheetFigure`) > sum(`synop_details`.`DetailList`)),concat(\'[-] \',(sum(`synop_details`.`BalanceSheetFigure`) - sum(`synop_details`.`DetailList`))),concat(\'[+] \',(sum(`synop_details`.`DetailList`) - sum(`synop_details`.`BalanceSheetFigure`)))) AS `Descrepancy`,`synop_details`.`OverduePrin` AS `OverduePrin`,`synop_details`.`Interest` AS `Interest`,`synop_details`.`OverdueInt` AS `OverdueInt`,`synop_details`.`sub_head` AS `sub_head`,`synop_details`.`pay_re` AS `pay_rec` from `co-operativebank-henria`.`synop_details` where (`synop_details`.`slno` = 4) group by `synop_details`.`sub_head`) union (select `synop_details`.`no` AS `no`,`synop_details`.`slno` AS `slno`,`synop_details`.`sl_no` AS `sl_no`,concat(`synop_details`.`sub_head`,\' | \',`synop_details`.`account`) AS `account`,`synop_details`.`BalanceSheetFigure` AS `BalanceSheetFigure`,`synop_details`.`DetailList` AS `DetailList`,if((sum(`synop_details`.`BalanceSheetFigure`) > sum(`synop_details`.`DetailList`)),concat(\'[-] \',(sum(`synop_details`.`BalanceSheetFigure`) - sum(`synop_details`.`DetailList`))),concat(\'[+] \',(sum(`synop_details`.`DetailList`) - sum(`synop_details`.`BalanceSheetFigure`)))) AS `Descrepancy`,`synop_details`.`OverduePrin` AS `OverduePrin`,`synop_details`.`Interest` AS `Interest`,`synop_details`.`OverdueInt` AS `OverdueInt`,`synop_details`.`sub_head` AS `sub_head`,`synop_details`.`pay_re` AS `pay_rec` from `co-operativebank-henria`.`synop_details` where ((`synop_details`.`sl_no` = 4) and (`synop_details`.`slno` <> 4) and (`synop_details`.`sub_head` like \'28%\')) group by `synop_details`.`sub_head` order by `sl_no`,`sub_head`) union (select `synop_details`.`no` AS `no`,`synop_details`.`slno` AS `slno`,`synop_details`.`sl_no` AS `sl_no`,concat(`synop_details`.`sub_head`,\' | \',`synop_details`.`account`) AS `account`,`synop_details`.`BalanceSheetFigure` AS `BalanceSheetFigure`,`synop_details`.`DetailList` AS `DetailList`,if((sum(`synop_details`.`BalanceSheetFigure`) > sum(`synop_details`.`DetailList`)),concat(\'[-] \',(sum(`synop_details`.`BalanceSheetFigure`) - sum(`synop_details`.`DetailList`))),concat(\'[+] \',(sum(`synop_details`.`DetailList`) - sum(`synop_details`.`BalanceSheetFigure`)))) AS `Descrepancy`,`synop_details`.`OverduePrin` AS `OverduePrin`,`synop_details`.`Interest` AS `Interest`,`synop_details`.`OverdueInt` AS `OverdueInt`,`synop_details`.`sub_head` AS `sub_head`,`synop_details`.`pay_re` AS `pay_rec` from `co-operativebank-henria`.`synop_details` where ((`synop_details`.`sl_no` = 4) and (`synop_details`.`slno` <> 4) and (not((`synop_details`.`sub_head` like \'28%\')))) group by `synop_details`.`sub_head` order by `synop_details`.`sl_no`,`sub_head`)
