![]() |
|
Решение бытовых проблем Не вся жизнь в машине. Иногда что-то и дома сделать нужно. |
![]() |
|
Опции темы | Поиск в этой теме | Опции просмотра |
|
![]() |
#1 |
Адрес: г. Донецк
Сообщений: 118
Длина: 1000мкм
Диаметр: 0мм
|
![]()
select "ManagerName", sum(jan) as jan , sum(feb) as feb, sum(jun) as jun from
( select case when to_char("OrderCreationTime",'mm')='01' then sum("OrderCost") else 0 end as jan, case when to_char("OrderCreationTime",'mm')='02' then sum("OrderCost") else 0 end as feb, case when to_char("OrderCreationTime",'mm')='06' then sum("OrderCost") else 0 end as jun, "ManagerName" from ordertable group by "ManagerName",to_char("OrderCreationTime",'mm' )) as q group by "ManagerName" |
![]() |
![]() |