User Tools

Site Tools


kurs:group_by_year
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
kurs/group_by_year.txt · Last modified: 2014/09/10 21:22 (external edit)