var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Deeply interested in suggested SQL to compute 3 year rolling averages of the count of records in a recordset. Have a date field. Help.
from (select Cnt=count(*),[Year]=year(DateCol) from viData group by year(DateCol)) y
cross join (select "x"=-1 union all select "x"=0 union all select "x"=1) x
group by y.[Year]+x.x
order by y.[Year]+x.x
Awesome! Thank you very much.
Log in with your username and password
Forgot your password?
Subscribe to dBforums Brief to receive special offers from dBforums partners and sponsors