标签:lsp prim content select rto 相关 lse cin gen
emp_no | first_name | last_name | btype | salary | bonus |
---|---|---|---|---|---|
10001 | Georgi | Facello | 1 | 88958 | 8895.8 |
10002 | Bezalel | Simmel | 2 | 72527 | 14505.4 |
10003 | Parto | Bamford | 3 | 43311 | 12993.3 |
10004 | Chirstian | Koblick | 1 | 74057 | 7405.7 |
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 ) as bonus from employees e inner join emp_bonus eb on e.emp_no =eb.emp_no inner join salaries s on e.emp_no =s.emp_no and s.to_date=‘9999-01-01‘;
标签:lsp prim content select rto 相关 lse cin gen
原文地址:https://www.cnblogs.com/guoyu1/p/12726047.html