Is there any equivalent function in Bigquery using Standard SQL for max_by and regr_slope functions. If not how to achieve this.
Thanks, Maniyar
Is there any equivalent function in Bigquery using Standard SQL for max_by and regr_slope functions. If not how to achieve this.
Thanks, Maniyar
It does not appear that BigQuery supports either of these functions out of the box. For
MAX_BY, you may just useROW_NUMBER:Or, you could use
LIMITif your version of BigQuery supports that:As for doing linear regressions in BigQuery, I refer you to this highly upvoted Stack Overflow question and answer.