select t.id,t.image,t.title,t.product,t.team_price,t.market_price,t.quantity_number,t.pre_number,t.seqno,t.summary,t.end_time, t.group_id,t.seo_html,t.WeiXin,t.FlagID,t.StartID,t.Traffic,t.Hotel,t.tuanqi,t.ClassID,t.Is18 from T_Search s inner join [t_team] t on t.id = s.s_id where (s.s_hash='1697806352813991') and s.s_addtime >= DATEADD (SECOND,-1800,GETDATE()) and t.state<>'hide' and t.start_time <= '2025/10/19 20:52:32' and ((t.end_time > '2025/10/19 20:52:32' and t.Is18=0) or t.Is18 in(3,4,7,9)) and t.id<>5111 and s.s_id<>5111 order by s.s_weight desc,(t.pre_number + t.quantity_number) desc