Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <unsigned value specification> ::=
- { <unsigned integer literal> }
- Declare @MA int = 50
- Declare @SQL varchar(max) ='Select Date, price, avg(price) over( order by Date, Date rows between '+cast(@MA as varchar(25))+' preceding and current row) as moving_avg from t1 '
- Exec(@SQL)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement