SQL Flow Field Guide

CHECKSUM_AGG

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

aggregate checksum

What changes

Input
int values of each group
Output or change
one checksum per group
Return type
Returns the checksum of all expression values as int.

Syntax at a glance

CHECKSUM_AGG ( [ ALL | DISTINCT ] expression )

Work example

Screen a group for likely changes with an inexpensive aggregate checksum.

Try null-only, duplicate, and one-row groups. Check result type and whether the aggregate is exact.

Check your work A collision is possible, so confirm candidate changes against source values.

Open Microsoft Learn for full syntax, permissions, and details for your version.