Aggregation functions
HASH_AGG
Reference material for HASH_AGG
Calculates a hash value over all rows on a list of arguments. When *
is specified as an argument - calculates a hash aggregation over all columns in the input. Performing a hash aggregation operation is useful for warming up table data or to check if the same values exist in two different tables.
Alias: CHECKSUM
Syntax
Parameters
Parameter | Description | Supported input types |
---|---|---|
<expression> | A column name for specific results for the HASH_AGG function to be applied to | Any <column> name |
Return Type
BIGINT
Examples
Example
The following code example creates a new table tournament_information
:
Example
The following code example calculates a hash aggregation based on all columns in the table tournament_information
:
Returns
1,889,915,309,908,437,919
The next example calculates a hash aggregation based on columns prizedollars
and tournamentid
only.
Returns
3,058,600,455,882,068,351