TYPE=VIEW
query=select `account`.`Date_open` AS `date_open`,`account`.`Acc_no` AS `acc_no`,`account`.`Name` AS `name`,`lb`.`amt` AS `bal`,`account`.`Sub_Head` AS `sub_head`,`account`.`Acc_Type` AS `acc_type` from (`co-operativebank-radhapur`.`account` join `co-operativebank-radhapur`.`ledger_balance` `lb`) where (`account`.`Acc_no` = `lb`.`ledger`) union all select curdate() AS `CURDATE()`,`co-operativebank-radhapur`.`cash_account`.`code` AS `acc_no`,`co-operativebank-radhapur`.`cash_account`.`name` AS `name`,`lb`.`amt` AS `bal`,`co-operativebank-radhapur`.`cash_account`.`sub_head` AS `sub_head`,\'Cash\' AS `Cash` from (`co-operativebank-radhapur`.`cash_account` join `co-operativebank-radhapur`.`ledger_balance` `lb`) where (`co-operativebank-radhapur`.`cash_account`.`code` = `lb`.`ledger`) union all select `la`.`date_open` AS `date_open`,`la`.`acc_no` AS `acc_no`,concat(`a`.`initial`,\' \',`a`.`fname`,\' \',`a`.`mname`,\' \',`a`.`lname`) AS `name`,`lb`.`amt` AS `amt`,`la`.`sub_head` AS `sub_head`,\'CC\' AS `CC` from ((`co-operativebank-radhapur`.`loan_acc` `la` join `co-operativebank-radhapur`.`applicant` `a`) join `co-operativebank-radhapur`.`ledger_balance` `lb`) where ((`la`.`acc_no` = `a`.`Acc_No`) and (`la`.`acc_no` = `lb`.`ledger`)) union all select `b`.`date` AS `date`,`co-operativebank-radhapur`.`brw`.`code` AS `code`,`co-operativebank-radhapur`.`brw`.`name` AS `name`,`lb`.`amt` AS `amt`,`co-operativebank-radhapur`.`brw`.`sub_head` AS `sub_head`,\'BRW\' AS `BRW` from ((`co-operativebank-radhapur`.`borrowing` `b` join `co-operativebank-radhapur`.`ledger_balance` `lb`) join `co-operativebank-radhapur`.`brw`) where ((`co-operativebank-radhapur`.`brw`.`code` = `lb`.`ledger`) and (`co-operativebank-radhapur`.`brw`.`code` = `b`.`scheme`))
md5=46a411bebd77796204178259a5d51f25
updatable=0
algorithm=0
definer_user=root
definer_host=localhost
suid=1
with_check_option=0
timestamp=2022-04-07 05:44:17
create-version=1
source=select  `account`.`Date_open`  AS  `date_open` ,\n `account`.`Acc_no`  AS  `acc_no` ,\n `account`.`Name`  AS  `name` ,\n `lb`.`amt`  AS  `bal` ,\n `account`.`Sub_Head`  AS  `sub_head` ,\n `account`.`Acc_Type`  AS  `acc_type`  from (  `co-operativebank-radhapur`.`account`  join  `co-operativebank-radhapur`.`ledger_balance`  `lb`  ) where (  `account`.`Acc_no`  =  `lb`.`ledger`  ) union  all  select curdate(  )  AS  `CURDATE()` ,\n `co-operativebank-radhapur`.`cash_account`.`code`  AS  `acc_no` ,\n `co-operativebank-radhapur`.`cash_account`.`name`  AS  `name` ,\n `lb`.`amt`  AS  `bal` ,\n `co-operativebank-radhapur`.`cash_account`.`sub_head`  AS  `sub_head` ,\n \'Cash\' AS  `Cash`  from (  `co-operativebank-radhapur`.`cash_account`  join  `co-operativebank-radhapur`.`ledger_balance`  `lb`  ) where (  `co-operativebank-radhapur`.`cash_account`.`code`  =  `lb`.`ledger`  ) union  all  select  `la`.`date_open`  AS  `date_open` ,\n `la`.`acc_no`  AS  `acc_no` ,\nconcat(  `a`.`initial` ,  \' \',  `a`.`fname` ,  \' \',  `a`.`mname` ,  \' \',  `a`.`lname`  )  AS  `name` ,\n `lb`.`amt`  AS  `amt` ,\n `la`.`sub_head`  AS  `sub_head` ,\n \'CC\' AS  `CC`  from ( (  `co-operativebank-radhapur`.`loan_acc`  `la`  join  `co-operativebank-radhapur`.`applicant`  `a`  ) join  `co-operativebank-radhapur`.`ledger_balance`  `lb`  ) where ( (  `la`.`acc_no`  =  `a`.`Acc_No`  ) and (  `la`.`acc_no`  =  `lb`.`ledger`  ) ) union  all  select  `b`.`date`  AS  `date` ,\n `co-operativebank-radhapur`.`brw`.`code`  AS  `code` ,\n `co-operativebank-radhapur`.`brw`.`name`  AS  `name` ,\n `lb`.`amt`  AS  `amt` ,\n `co-operativebank-radhapur`.`brw`.`sub_head`  AS  `sub_head` ,\n \'BRW\' AS  `BRW`  from ( (  `co-operativebank-radhapur`.`borrowing`  `b`  join  `co-operativebank-radhapur`.`ledger_balance`  `lb`  ) join  `co-operativebank-radhapur`.`brw`  ) where ( (  `co-operativebank-radhapur`.`brw`.`code`  =  `lb`.`ledger`  ) and (  `co-operativebank-radhapur`.`brw`.`code`  =  `b`.`scheme`  ) )
client_cs_name=utf8
connection_cl_name=utf8_general_ci
view_body_utf8=select `account`.`Date_open` AS `date_open`,`account`.`Acc_no` AS `acc_no`,`account`.`Name` AS `name`,`lb`.`amt` AS `bal`,`account`.`Sub_Head` AS `sub_head`,`account`.`Acc_Type` AS `acc_type` from (`co-operativebank-radhapur`.`account` join `co-operativebank-radhapur`.`ledger_balance` `lb`) where (`account`.`Acc_no` = `lb`.`ledger`) union all select curdate() AS `CURDATE()`,`co-operativebank-radhapur`.`cash_account`.`code` AS `acc_no`,`co-operativebank-radhapur`.`cash_account`.`name` AS `name`,`lb`.`amt` AS `bal`,`co-operativebank-radhapur`.`cash_account`.`sub_head` AS `sub_head`,\'Cash\' AS `Cash` from (`co-operativebank-radhapur`.`cash_account` join `co-operativebank-radhapur`.`ledger_balance` `lb`) where (`co-operativebank-radhapur`.`cash_account`.`code` = `lb`.`ledger`) union all select `la`.`date_open` AS `date_open`,`la`.`acc_no` AS `acc_no`,concat(`a`.`initial`,\' \',`a`.`fname`,\' \',`a`.`mname`,\' \',`a`.`lname`) AS `name`,`lb`.`amt` AS `amt`,`la`.`sub_head` AS `sub_head`,\'CC\' AS `CC` from ((`co-operativebank-radhapur`.`loan_acc` `la` join `co-operativebank-radhapur`.`applicant` `a`) join `co-operativebank-radhapur`.`ledger_balance` `lb`) where ((`la`.`acc_no` = `a`.`Acc_No`) and (`la`.`acc_no` = `lb`.`ledger`)) union all select `b`.`date` AS `date`,`co-operativebank-radhapur`.`brw`.`code` AS `code`,`co-operativebank-radhapur`.`brw`.`name` AS `name`,`lb`.`amt` AS `amt`,`co-operativebank-radhapur`.`brw`.`sub_head` AS `sub_head`,\'BRW\' AS `BRW` from ((`co-operativebank-radhapur`.`borrowing` `b` join `co-operativebank-radhapur`.`ledger_balance` `lb`) join `co-operativebank-radhapur`.`brw`) where ((`co-operativebank-radhapur`.`brw`.`code` = `lb`.`ledger`) and (`co-operativebank-radhapur`.`brw`.`code` = `b`.`scheme`))
