Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How to compare current row values with next row values in BigQuery Stored Procedure

Hi,

In Big Query stored procedure, I need to compare the current row values with next row values. How can I achieve this.

In MySQL, we can get the next row values using select * from limit currentrownumber+1, 1 and compare the values. 

 

 

0 2 3,617
2 REPLIES 2

Hi,

In BigQuery there is not exists that functionality. You can i think see this: https://cloud.google.com/bigquery/docs/reference/standard-sql/navigation_functions

Maybe you can write some sample snipped code what is input to that function what is need to output. But like i write for me we don't need a procedure window function i think can help you 🙂

Best,

Greg

As Greg mentioned you could try and make use of Navigation Functions and transform it to the needs that you want.