select A.Date , (
select round(avg(cast(B.xClose as float)),2) from
(select top 55 cast(C.xclose as float) xClose from StockDailyHis C
where C.Date<=A.Date and C.StockNo = A.StockNo order by C.Date desc) B
) from StockDailyHis A where StockNo = '1234'
沒有留言:
張貼留言