34,588
社区成员
发帖
与我相关
我的任务
分享
select sum(a) from (select top 3 a from A order by a desc)ta
if object_id('tb') is not null
drop table tb
go
create table tb(a int)
go
insert into tb
select 2 union all
select 3 union all
select 1 union all
select 5 union all
select 6 union all
select 4
go
select sum(a) from (
select top 3 * from tb order by a desc
)a