27,582
社区成员




(case when [计划]=0 then 0 else [实际]/[计划] end as [达成率])
select [公司名称],
sum(case when [销售部门]='展厅' and [订单状态] = '申请' then 1 else 0 end) as [展厅.申请],
sum(case when [销售部门]='区域' and [订单状态] = '申请' then 1 else 0 end) as [区域.申请],
sum(case when [销售部门]='展厅' and [订单状态] = '合同' then 1 else 0 end) as [展厅.合同],
sum(case when [销售部门]='区域' and [订单状态] = '合同' then 1 else 0 end) as [区域.合同]
from [表]
group by [公司名称]