एक विधि विश्लेषणात्मक कार्यों के दो स्तरों का उपयोग करती है:
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