Grouping records and getting standard deviation intervals for grouped records in BigQuery, getting wrong value

后端 未结 1 555
自闭症患者
自闭症患者 2020-12-12 07:11

I have a SQL below which is able to get the interval average of timestamp column grouped by icao_address, flight_number, flight_date. I\'m trying to do the same for standard

相关标签:
1条回答
  • 2020-12-12 07:57

    You can use STDDEV_POP(<FLOAT>) to calculate the standard deviation as you can see here

    Description

    Returns the population (biased) standard deviation of the values. The return result is between 0 and +Inf.

    This function ignores any NULL inputs. If all inputs are ignored, this function returns NULL.

    If this function receives a single non-NULL input, it returns 0.

    Supported Input Types

    FLOAT64

    Optional Clauses

    The clauses are applied in the following order:

    OVER: Specifies a window. See Analytic Functions. This clause is currently incompatible with all other clauses within STDDEV_POP(). DISTINCT: Each distinct value of expression is aggregated only once into the result.

    Return Data Type

    FLOAT64

    I hope it helps

    0 讨论(0)
提交回复
热议问题