Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Help me calculate previsou 3 rows as an everage

$
0
0
I have a table, where each row represents a train wagon that has been loaded with product. Each row has a "Loading Time" column. However I also have a "Average time over past 3 wagons" column that I need to calculate the last 3 wagons AVERAGE loading time between them prior to the wagon selected to determine the average loading time for the past 3 wagons. How do I select the data and calculate this in SQL?

Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>