题解 | 用户购买次数前三
select
uid,
count(1) as cnt
from
user_client_log
where
step = 'order'
group by
uid
order by
cnt desc,
uid asc
limit
3
select
uid,
count(1) as cnt
from
user_client_log
where
step = 'order'
group by
uid
order by
cnt desc,
uid asc
limit
3
相关推荐