with t1 as ( select q3.product_id as product_id, in_price, price, if(status =2 ,-cnt,cnt) as cnt, quantity, price * cnt as sr from tb_product_info as q1 join tb_order_detail as q3 on q...