Pivot with Oracle

0

In this query, day is a date field, effort a numerical field where I keep the number of hours worked and technical, as the name of the technician. I want to get the hours for each month from each technician.

select * from 
(
select to_char(dia, 'yyyymm'), tecnico, esfuerzo
from seguimiento_diario
) 
pivot
(
sum(esfuerzo) for to_char(dia, 'yyyymm') in (select to_char(dia, 'yyyymm') from seguimiento_diario)
) 
order by tecnico
    
asked by Unai Longvalley 20.12.2018 в 14:44
source

0 answers