I would like an example of a function in BigQuery (SQL), in order to see the syntax needed to create such a function: create a function in BigQuery, using SQL (not JavaScript), where internally an array and loop is created to iterate this array, adding the values of the array and returning the resulting sum (int64).
