Skip to content

Tag: google-bigquery

Correct BigQuery SQL to get value from previous partition

I am trying to use a window function to get a value from the previous partition/window frame (rather than from some other row in the same partition). I don’t fully understand how I can do this but have tried various combinations of using: partition clause but with LAG() function omitting partition claus…