This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
kurs:einfache_selects [2012/09/25 17:22] 127.0.0.1 external edit |
kurs:einfache_selects [2013/04/29 12:46] mh |
||
---|---|---|---|
Line 29: | Line 29: | ||
and salary not in (10000, 14000) | and salary not in (10000, 14000) | ||
order by salary desc | order by salary desc | ||
+ | </code> | ||
+ | |||
+ | null felder | ||
+ | |||
+ | <code> | ||
+ | select first_name vorname, | ||
+ | last_name, | ||
+ | salary, | ||
+ | -- salary * 2, | ||
+ | salary + salary * coalesce(commission_pct, 0) auszahlung, | ||
+ | coalesce(commission_pct, 0) cp | ||
+ | from employees | ||
+ | where salary + salary * coalesce(commission_pct, 0) > 10000 | ||
+ | order by cp asc | ||
+ | -- commission_pct is null | ||
+ | -- commission_pct in (0.15, 0.2, 0.3, null) | ||
</code> | </code> |