select '八月' 月份,SUM(case when month(PetitionTime)='8' and chuliren='A君' then isnull(consuming,0) else 0 end) 'A君',SUM(case when month(PetitionTime)='8' and chuliren='B君' then isnull(consuming,0) else 0 end) 'B君'from dbo.Table1where chuliren is not null...