1.
select p.pat_id ,p.ins_ids_1,i1.description,p.ins_ids_2,i1.description,p.ins_ids_3,i1.description
from Patient p
left join Insurance i1 on p.ins_ids_1 = i1.ins_id
left join Insurance i2 on p.ins_ids_1 = i2.ins_idleft join Insurance i3 on p.ins_ids_1 = i3.ins_idorder by p.pat_id
2.
update a
set a.sum = (select sum(b.amount) from b where a.id = b.id groub by b.id)
3.
delete account a
where a.rowid <(select max(rowid) from account b where b.type = a.type and b.acct_no = a.acct_no)