select g.goods_no,g.spec_wh_no,g.num_day,h.num_yesterday ,g.stock_num,g.subscribe_num,g.order_num,g.sending_num,g.purchase_numfrom(select f.goods_no,e.spec_id,e.num_day,e.spec_wh_no,e.stock_num,e.subscribe_num,e.order_num,e.sending_num,e.purchase_numfrom(select c.spec_id,c.num_day,d.spec_wh_no,d.stock_num,d.subscribe_num,d.order_num,d.sending_num,d.purchase_numfrom(select spec_id,num_day from stat_sales_summary where warehouse_id = 5 and to_days(sales_date) = to_days(now())) cleft join(select spec_id,spec_wh_no,stock_num,subscribe_num,order_num,sending_num,purchase_num from stock_spec where warehouse_id = 5) don c.spec_id = d.spec_id)eleft join (select b.spec_id,goods_no from goods_goods a left join goods_spec b on a.goods_id = b.goods_id)f on e.spec_id = f.spec_id )gleft join (select spec_id,num_day as num_yesterday from stat_sales_summary where warehouse_id = 5 and to_days(sales_date) = to_days(now())-1)hon g.spec_id = h.spec_id