select e.emp_no,e.first_name, e.last_name, eb.btype,s.salary
, case when eb.btype =1 then s.salary*0.1
	   when eb.btype =2 then s.salary*0.2
       else s.salary*0.3
	   end bonus
from employees e, emp_bonus eb, salaries s
where e.emp_no = eb.emp_no
and   e.emp_no = s.emp_no
and s.to_date='9999-01-01'