with
t1 as(
select
pay_method,
count(pay_method) as cnt
from
user_client_log left join product_info using(product_id)
where
product_name='anta' and step='select'
group by
pay_method
),
t2 as(
select
(
case
when pay_method='' then 'error'
else pay_method
end
) as pay_method,
cnt
from
t1
)
select * from t2

京公网安备 11010502036488号