This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
kurs:group_by_beispiele [2013/10/21 13:05] mh |
kurs:group_by_beispiele [2014/05/20 15:24] mh |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | <code> | ||
+ | with ym as ( | ||
+ | select employee_id, | ||
+ | -- extract(year from hire_date) y, | ||
+ | extract(month from hire_date) m | ||
+ | from employees | ||
+ | ) | ||
+ | select m, count(employee_id) | ||
+ | from ym | ||
+ | group by m | ||
+ | order by m | ||
+ | </code> | ||
+ | |||
+ | |||
+ | |||
<code> | <code> | ||
with gehaltklassen as ( | with gehaltklassen as ( |