select
CASE
WHEN param1 <> 'CN' THEN 'OVERSEA'
When param2 = '1' Then '1'
When param2= '2' Then '2'
When param2= '3' Then '3'
Else 'Others'
end as delitype,create_m, sum(quty)
from table WHERE PLANT = '376W'
group by CASE
WHEN param1 <> 'CN' THEN 'OVERSEA'
When param2 = '1' Then '1'
When param2 = '2' Then '2'
When param2 = '3' Then '3'
Else 'Others'
end, create_m
oracle case when 用法
最新推荐文章于 2024-10-31 12:15:00 发布