1つの方法では、2つのレベルの分析関数を使用します。
select t.*, max(running_avg_3) over (partition by item_id)
from (select t.*,
avg(qty) over (partition by item_id order by year desc
rows between current row and 2 following
) as running_avg_3
from t
) t