题解 | 下单最多的商品
下单最多的商品
https://www.nowcoder.com/practice/d7c93e3a3d5b4087896539121d32d367
select product_id, sum( case when step = 'order' then 1 else 0 end ) cnt from user_client_log group by product_id order by product_id limit 1
下单最多的商品
https://www.nowcoder.com/practice/d7c93e3a3d5b4087896539121d32d367
select product_id, sum( case when step = 'order' then 1 else 0 end ) cnt from user_client_log group by product_id order by product_id limit 1
相关推荐