select product_id, round(if(count(product_id) = 0,0,sum(if_click) / count(product_id)),3) ctr, round(if(sum(if_click) = 0,0,sum(if_cart) / sum(if_click)),3) cart_rate, round(if(sum(if_cart) = 0,0,sum(if_payment) / sum(if_cart)),3) payment_rate, round(if(sum(if_payment) = 0,0,sum(if_refund) / sum(if...