$data=DB::name('goods_common')->alias('a')->join('all580_goods_attractions w','a.common_id = w.common_id')->join('all580_goods_tickets t','a.common_id = t.common_id')->where($where)->where('goods_state','>',0)->where('t.t_status=0')->group('common_id')->field('a.*,w.LEVEL,min(price)as price')->select();
转载于:https://www.cnblogs.com/cici1989/p/9673282.html