SELECT product_id, ROUND(SUM(if_click)/COUNT(product_id),3) AS ctr, ROUND(IF(SUM(if_click)=0,0,SUM(if_cart)/SUM(if_click)),3) AS cart_rate, ROUND(IF(SUM(if_cart)=0,0,SUM(if_payment)/SUM(if_cart)),3) AS payment_rate, ROUND(IF(SUM(if_payment)=0,0,SUM(if_refund)/SUM(if_payment)),3)...