主要就是理清楚:1、展示次数用count(*)2、其他各种次数都是sum()先构建一张表,把每个商品的展示、点击、加购等次数计算出来,然后筛选退货率<=0.5的展示即可SELECT product_id, if(view_times<>0,round(click_times/view_times,3),0) as "ctr", if(click_times<>0,round(cart_times/click_times,3),0) as "cart_rate", if(cart_times<>0,round(payment_times/cart_ti...