设表为:业务表字段:业务员,业务类型(A,B),业务金额

select 业务员, sum(priceA) as priceA,sum(priceB) as priceB
from
(
select

业务员
,业务类型
,(case when t_s_module.业务类型=A then sum(业务金额) else '0' end) as priceA
,(case when t_s_module.业务类型=B then sum(benable) else '0' end) as priceB
from 业务表
group by 业务员,业务类型)

as 业务类型分类金额表

group by st.student

相关文章:

  • 2022-02-06
  • 2021-10-01
  • 2022-12-23
  • 2021-12-26
  • 2021-10-24
  • 2021-11-13
  • 2021-12-26
  • 2022-01-26
猜你喜欢
  • 2021-08-24
  • 2021-06-01
  • 2021-12-21
  • 2021-10-22
  • 2021-12-26
  • 2021-09-03
  • 2021-10-13
相关资源
相似解决方案