User Tools

Site Tools


kurs:case_group_by

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

kurs:case_group_by [2014/09/10 21:22]
kurs:case_group_by [2014/09/10 21:22] (current)
Line 1: Line 1:
 +<​code>​ 
 +select alt, count(alt) from ( 
 +select ((case when hire_date > (sysdate - to_yminterval('​12-0'​)) then '​Neuling' ​  
 +             when hire_date > (sysdate - to_yminterval('​15-0'​)) then '​Mittelding'​  
 +                                                                else 'Alter Sack' end)) alt 
 +from employees) 
 +group by alt 
 +</​code>​
kurs/case_group_by.txt · Last modified: 2014/09/10 21:22 (external edit)