User Tools

Site Tools


kurs:group_by_year

Differences

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

Link to this comparison view

kurs:group_by_year [2014/09/10 21:22]
kurs:group_by_year [2014/09/10 21:22] (current)
Line 1: Line 1:
 +<​code>​ 
 +select years2, count(years),​ count(years2),​ count(years)-count(years2) from ( 
 +  --  select extract(year from ((sysdate - hire_date) year to month)) years  from employees 
 +  select extract(year from ((sysdate - hire_date) year to month)) years, 
 +         ​trunc((sysdate - hire_date)/​365) years2 
 +  from employees 
 +  ) 
 +group by years2 
 +order by years2 
 +</​code>​
kurs/group_by_year.txt · Last modified: 2014/09/10 21:22 (external edit)