thunderkid
Technical User
Need help! I am trying to calculate the average for the 5th column values for records when value in third column changes. A sample of data is given below.
thanks
thunderkid
data
-----
short 2 1 3 2 0
short 2 1 3 2 0
short 2 1 3 2 0
short 2 1 3 2 0
short 2 1 3 2 0
short 2 1 3 2 0
short 2 1 3 2 0
short 2 1 3 2 0
short 2 1 3 2 0 <-- select this record
short 2 2 0 8 0
short 2 2 0 8 0
short 2 2 0 8 0
short 2 2 0 8 0
short 2 2 0 8 0
short 2 2 0 8 0
short 2 2 0 8 0
short 2 2 0 8 0
short 2 2 0 6 2 <-- select this record
desired results
Col1 Col2 Col5avg
short 2 4
thanks
thunderkid
data
-----
short 2 1 3 2 0
short 2 1 3 2 0
short 2 1 3 2 0
short 2 1 3 2 0
short 2 1 3 2 0
short 2 1 3 2 0
short 2 1 3 2 0
short 2 1 3 2 0
short 2 1 3 2 0 <-- select this record
short 2 2 0 8 0
short 2 2 0 8 0
short 2 2 0 8 0
short 2 2 0 8 0
short 2 2 0 8 0
short 2 2 0 8 0
short 2 2 0 8 0
short 2 2 0 8 0
short 2 2 0 6 2 <-- select this record
desired results
Col1 Col2 Col5avg
short 2 4