select order_status,
case
when order_status IN ('CLOSED', 'COMPLETE') then 'No Action'
when order_status IN ('ON_HOLD', 'PAYMENT_REVIEW', 'PENDING', 'PENDING_PAYMENT', 'PROCESSING') then 'Pending Action'
else 'Risky'
end from orders limit 10;
select cast(date_format(order_date, 'YYYYMM') as int) from orders limit 100;