刀不磨要生锈--SQL语句之“加总”Group By

刀不磨要生锈--SQL语句之“加总”Group By
要求:根据Reinsurance_Level和ReCompanyCode进行汇总:

select  t.reinsurance_Level,t.re_Company_Code, sum (t.ceded_Amount) 
    
from  Claimnotice_Insurance_Detail t 
    
where   1 = 1
--  此处加条件
  group   by  t.reinsurance_Level,t.re_Company_Code;
结果:

REINSURANCE_LEVEL RE_COMPANY_CODE 3
1 1 2621000
1 2 1534000
1 3 375000
Q 2 302000
Q 4 302000

  

你可能感兴趣的:(刀不磨要生锈--SQL语句之“加总”Group By)