I have a table with three columns. I need to take average of a column(duration) based on the repetition of another column(phase).
id phase duration
19743 D17 1.66
19743 D06 2.25
19743 C17 2.3
19743 D06 4.44
In above data D06 have two entries, and instead of taking two I need to get the average of D06 in a single row along with other. The final output should be like this.
id phase duration
19743 D17 1.66
19743 D06 3.35
19743 C17 2.3