I have one select:
我有一个选择:
select
b.[FiscalPeriod],
b.[Column2],b.[Current_Value],
(
select TOP 1 [Column3] from [table1] b2
where month(b.ReportingPeriod) = month(DATEADD(month,1,b2.ReportingPeriod))
AND YEAR(b.ReportingPeriod) = YEAR(DATEADD(month,1,b2.ReportingPeriod))
AND b.id = b2.id
) as PREV_VALUE
FROM [table1] b
select
b.[Fiscal