Aggregate Analytic Functions in Standard SQL

The following sections describe the aggregate analytic functions that BigQuery supports. For an explanation of how analytic functions work, see Analytic Function Concepts. For an explanation of how aggregate analytic functions work, see Aggregate Analytic Function Concepts.

BigQuery supports the following aggregate functions as analytic functions:

OVER clause requirements:

  • PARTITION BY: Optional.
  • ORDER BY: Optional. Disallowed if DISTINCT is present.
  • window_frame_clause: Optional. Disallowed if DISTINCT is present.

Example:

COUNT(*) OVER (ROWS UNBOUNDED PRECEDING)
SUM(DISTINCT x) OVER ()
Cette page vous a-t-elle été utile ? Évaluez-la :

Envoyer des commentaires concernant…

Besoin d'aide ? Consultez notre page d'assistance.