题解 | 商品销售排名
SELECT product_name,count(distinct trace_id) * price as total from product_info as t1 inner join user_client_log as u using (product_id) where pay_method <> '' GROUP BY product_name,price ORDER BY price DESC;
SELECT product_name,count(distinct trace_id) * price as total from product_info as t1 inner join user_client_log as u using (product_id) where pay_method <> '' GROUP BY product_name,price ORDER BY price DESC;
相关推荐