create table b
(
Years int,
Salaty int
)
insert into b values(2000,1000)
insert into b values(2001,2000)
insert into b values(2002,3000)
insert into b values(2003,4000)
select * from b
go
select Years, (select sum(Salaty) from b where b.Years<= c.Years) Salaty from b c
时间: 2024-09-30 11:05:45