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 ()
Trang này có hữu ích không? Hãy cho chúng tôi biết đánh giá của bạn:

Gửi phản hồi về...

Bạn cần trợ giúp? Truy cập trang hỗ trợ của chúng tôi.