Fungsi untuk menghitung nilai dari kumpulan data. Temukan semua 28 fungsi aggregate di BigQuery lengkap dengan syntax, contoh, dan penjelasan bahasa Indonesia.
28 fungsi aggregate di BigQuery
← Semua fungsi BigQueryReturns one value from a group non-deterministically. Useful for retrieving a value from a column that is not being aggregated when all values in the group are the same.
Same as input typeEstimates the number of distinct values using the HyperLogLog++ algorithm. Much faster and less resource-intensive than COUNT(DISTINCT) for large datasets.
INT64Calculates approximate quantile boundaries from numeric data. Uses an efficient approximate algorithm for large datasets, returning an array with n+1 elements.
ARRAY<T>Returns the approximate most frequently occurring elements along with their counts. Uses a highly efficient approximate algorithm for large datasets.
ARRAY<STRUCT<value T, count INT64>>Returns the approximate elements with the highest total weight. Similar to APPROX_TOP_COUNT but ranked by sum of weights rather than count.
ARRAY<STRUCT<value T, sum INT64>>Collects values from multiple rows into an ARRAY. A powerful BigQuery function for building nested data structures.
ARRAY<T>Concatenates multiple arrays into a single array. Useful when each row already contains an array and you want to merge them all into one.
ARRAY<T>Calculates the average (mean) of numeric values in a column. Ignores NULL values and supports multiple numeric types in BigQuery.
FLOAT64Performs a bitwise AND operation across all values in a group. Returns a value where each bit is 1 only if all input values have that bit set to 1.
INT64Performs a bitwise OR operation across all values in a group. Returns a value where each bit is 1 if at least one input value has that bit set to 1.
INT64Performs a bitwise XOR operation across all values in a group. Returns a value where each bit is 1 if the number of input values with that bit set to 1 is odd.
INT64Menghitung koefisien korelasi Pearson antara dua kolom numerik.
FLOAT64Counts the number of rows or non-NULL values in a column. A fundamental aggregate function in BigQuery for large-scale data analysis.
INT64Counts the number of rows that satisfy a given condition. Provides a more concise and readable syntax compared to COUNT with CASE or IF.
INT64Menghitung kovarians populasi antara dua kolom numerik.
FLOAT64Menghitung kovarians sample antara dua kolom numerik.
FLOAT64Returns TRUE if ALL values in the group are TRUE. Acts as an aggregated AND operator, useful for verifying that every condition in a set is met.
BOOLReturns TRUE if AT LEAST ONE value in the group is TRUE. Acts as an aggregated OR operator, useful for checking whether any condition in a set is met.
BOOLReturns the maximum value from a column or expression. Supports numeric, string, date/time, and boolean types in BigQuery.
Same as input typeReturns the minimum value from a column or expression. Supports numeric, string, date/time, and boolean types in BigQuery.
Same as input typeCalculates the sample standard deviation of numeric values. Measures how spread out the data is from its mean. An alias for STDDEV_SAMP.
FLOAT64Calculates the population standard deviation of numeric values. Uses the N divisor formula (not N-1), suitable when the data represents an entire population.
FLOAT64Calculates the sample standard deviation of numeric values. Uses the N-1 divisor formula (Bessel's correction), suitable for sample data that represents a larger population.
FLOAT64Concatenates string values from multiple rows into a single string with a specified delimiter. Very useful for creating lists or comma-separated values in BigQuery.
STRINGCalculates the total sum of numeric values in a column. Supports multiple numeric types and is highly efficient for large-scale data analysis in BigQuery.
Same as input type (INT64, FLOAT64, NUMERIC, or BIGNUMERIC)Calculates the sample variance of numeric values. Variance is the square of the standard deviation. This is an alias for VAR_SAMP.
FLOAT64Calculates the population variance of numeric values. Uses the N divisor formula, suitable when the data represents an entire population.
FLOAT64Calculates the sample variance of numeric values. Uses the N-1 divisor formula (Bessel's correction), suitable for sample data.
FLOAT64