This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
|
kurs:group_by_beispiele [2014/09/10 21:22] 127.0.0.1 external edit |
kurs:group_by_beispiele [2020/05/18 11:25] (current) admin |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | <code> | ||
| + | select | ||
| + | department_name, | ||
| + | count(*) c | ||
| + | from employees e join departments d | ||
| + | on e.department_id = d.department_id | ||
| + | group by | ||
| + | department_name | ||
| + | having count(*) >= 5 | ||
| + | order by c desc | ||
| + | </code> | ||
| + | |||
| + | |||
| <code> | <code> | ||
| with ym as ( | with ym as ( | ||