By using window functions in Big Query, I want to calculate the average of a column based on some conditions. I use a window function in stead of a join because my actual datase