TYPE=VIEW
query=select `i`.`code` AS `acc_no`,if((`i`.`draw_bank` = \'\'),`s`.`sub_head`,`i`.`draw_bank`) AS `name` from (`co-operativebank`.`income` `i` join `co-operativebank`.`sub_head` `s`) where ((`s`.`code` = `i`.`sub_head`) and (`i`.`code` like \'INC%\')) union all select `d`.`code` AS `code`,concat(`a`.`fname`,\' \',`a`.`mname`,\' \',`a`.`lname`) AS `name` from (`co-operativebank`.`shares` `d` join `co-operativebank`.`applicant` `a`) where (`d`.`acc_no` = `a`.`Acc_No`) group by `a`.`Acc_No`,`d`.`acc_no` union all select `a`.`Acc_No` AS `acc_no`,concat(`a`.`fname`,\' \',`a`.`mname`,\' \',`a`.`lname`) AS `name` from `co-operativebank`.`applicant` `a` group by `a`.`Acc_No` union all select `loan_account`.`acc_no` AS `acc_no`,`loan_account`.`name` AS `name` from `co-operativebank`.`loan_account` group by `loan_account`.`acc_no`
md5=3dd1ef7d7e58d39cf3b6a2ff29992997
updatable=0
algorithm=0
definer_user=root
definer_host=localhost
suid=1
with_check_option=0
timestamp=2018-05-19 04:43:10
create-version=1
source=select `i`.`code` AS `acc_no`,if((`i`.`draw_bank` = \'\'),`s`.`sub_head`,`i`.`draw_bank`) AS `name` from (`income` `i` join `sub_head` `s`) where ((`s`.`code` = `i`.`sub_head`) and (`i`.`code` like \'INC%\'))
\nunion all select `d`.`code` AS `code`,concat(`a`.`fname`,\' \',`a`.`mname`,\' \',`a`.`lname`) AS `name` from (`shares` `d` join `applicant` `a`) where (`d`.`acc_no` = `a`.`Acc_No`) group by `a`.`Acc_No`,`d`.`acc_no` union all select `a`.`Acc_No` AS `acc_no`,concat(`a`.`fname`,\' \',`a`.`mname`,\' \',`a`.`lname`) AS `name` from `applicant` `a` group by `a`.`Acc_No` union all select acc_no,name from loan_account GROUP BY ACC_NO
client_cs_name=utf8
connection_cl_name=utf8_general_ci
view_body_utf8=select `i`.`code` AS `acc_no`,if((`i`.`draw_bank` = \'\'),`s`.`sub_head`,`i`.`draw_bank`) AS `name` from (`co-operativebank`.`income` `i` join `co-operativebank`.`sub_head` `s`) where ((`s`.`code` = `i`.`sub_head`) and (`i`.`code` like \'INC%\')) union all select `d`.`code` AS `code`,concat(`a`.`fname`,\' \',`a`.`mname`,\' \',`a`.`lname`) AS `name` from (`co-operativebank`.`shares` `d` join `co-operativebank`.`applicant` `a`) where (`d`.`acc_no` = `a`.`Acc_No`) group by `a`.`Acc_No`,`d`.`acc_no` union all select `a`.`Acc_No` AS `acc_no`,concat(`a`.`fname`,\' \',`a`.`mname`,\' \',`a`.`lname`) AS `name` from `co-operativebank`.`applicant` `a` group by `a`.`Acc_No` union all select `loan_account`.`acc_no` AS `acc_no`,`loan_account`.`name` AS `name` from `co-operativebank`.`loan_account` group by `loan_account`.`acc_no`
