これは私のクエリです
select
(sum(case when offer1_delivered is not null then 1 else null end) ) as PenetrationRate1
,(sum(case when offer2_delivered is not null then 1 else null end)) as PenetrationRate2
,count(TargetMkgListID) as TargetMkgListID from tablename
出力
PenetrationRate1 PenetrationRate2 TargetMkgListID
1 2 3
このクエリに customername 列を含める必要があります
select customername,
(sum(case when offer1_delivered is not null then 1 else null end) ) as PenetrationRate1
,(sum(case when offer2_delivered is not null then 1 else null end)) as PenetrationRate2
,count(TargetMkgListID) as TargetMkgListID from tablename
group by customername
クエリに customername を含めると、groupby が正しく機能しません。