【发布时间】:2022-11-15 06:23:57
【问题描述】:
标签: sql sql-server group-by
标签: sql sql-server group-by
就像是:
SELECT workflow
, case when min(status) = max(status) THEN min(status) -- if all status is same, set to status
when min(case when status = 'Error' then 0 end) = 0 then 'Intederminate' -- if any status is error then intedermined
else 'Running' end
FROM #ProcessLog
group by workflow
也许?
【讨论】: