Skip to content
Advertisement

Get Other Columns based on window function maximum value, Bigquery

How to get the whole row or other column value for the same row for which window function in over clause gave output.

For ex.

Using the above query I get output as the best value which defined the maximum number above me when order by timestamp.

The output of the above column :

Query Output

I calculated the best value using the over function, but I also want the date column on which day it was best.

Advertisement

Answer

Maybe this one?

enter image description here

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement