This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
kurs:einfache_selects [2014/05/12 12:29] mh |
kurs:einfache_selects [2020/05/05 12:06] (current) admin |
||
---|---|---|---|
Line 83: | Line 83: | ||
from v_emp_com | from v_emp_com | ||
</code> | </code> | ||
+ | |||
+ | |||
+ | <code> | ||
+ | select | ||
+ | employee_id, | ||
+ | first_name, | ||
+ | last_name, | ||
+ | coalesce(to_char(commission_pct), 'n/a'), | ||
+ | salary * coalesce(commission_pct, 0) as bonus | ||
+ | from hr.employees where | ||
+ | employee_id in (144, 145) | ||
+ | </code> | ||
+ | |||
+ | <code> | ||
+ | select first_name, | ||
+ | last_name, | ||
+ | salary / 7, | ||
+ | trunc(salary / 7, -3), | ||
+ | round(salary / 7, 2) | ||
+ | from hr.employees | ||
+ | where salary > 12000 | ||
+ | </code> | ||