User Tools

Site Tools


kurs:pivot
with cte_quartal as (
select 
    employee_id,
    employee_id emp_id,
    last_name,
    to_char(hire_date, 'Q') quartal
from hr.employees
)
select * from cte_quartal
  pivot
  (
   count(employee_id) for quartal in (
     '1' q1,
     '2' q2,
     '3' q3,
     '4' q4)
  )
 
kurs/pivot.txt · Last modified: 2022/03/14 14:24 by admin