Please can somebody tell me how the CHECKSUM_AGG function works?
When I run the following query:
SELECT STUDENTID,
CHECKSUM_AGG(Grade) as GradeCheckSumAgg
FROM (VALUES (1,100),
(1,100),
(1,100),
(1,99),
(1,99),
(1,98),
(1,98),
(1,95),
(1,95),
(1,95)
) dr (Studentid, Grade)
Group by Studentid
The value 59 is returned for the CheckSumAgg - can somebody tell me why 59 is returned?