更新时间:2023-02-21 23:03:49
select id, case when count(case mark when 'C' then 1 else null end) = 0 then sum(amount) else sum(case when mark <> 'A' then amount else 0 end) end from sampletable group by id
如果记录存在,则映射;如果不存在,则映射另一个-Biztalk映射
如果存在另一个记录,则排除该记录的值