;with cte as ( select top 2 * from tab order by 价格 desc ) select * from cte union all select top 3 * from tab where id not in (select id from cte) order by newid()
with cte as ( select top 2 * from tab order by 价格 desc ) select * from cte union all select * from ( select top 3 * from tab where id not in (select id from cte) order by newid() ) as t
select top 2 * from tab order by 价格 desc
)
select * from cte
union all
select top 3 * from tab
where id not in (select id from cte)
order by newid()
select top 2 * from tab order by 价格 desc
)
select * from cte
union all
select * from (
select top 3 * from tab
where id not in (select id from cte)
order by newid()
) as t