select
case 
when pay_method = '' then 'error'
else pay_method
end as pay_method,
count(1) as num from 
(
select p.product_id,product_name,pay_method from product_info p 
join
(
select product_id,pay_method from user_client_log
where step = 'select'
) as u
on p.product_id = u.product_id
where product_name = 'anta') as t1
group by pay_method
order by num desc