select
product_id,
count(distinct trace_id) as cnt
from
user_client_log
where
step = 'order'
group by
product_id
order by
count(distinct trace_id) desc,
product_id asc
limit
1

select
product_id,
count(distinct trace_id) as cnt
from
user_client_log
where
step = 'order'
group by
product_id
order by
count(distinct trace_id) desc,
product_id asc
limit
1