• Just wondering what the grand-masters will say about a checksum solution?

    From what I know about checksums they are pretty reliable way to tell one set from the other... Any comments are welcome.

    ; WITH CTE

    as (

    SELECT worker_id,

    CHECKSUM_AGG(CHECKSUM(rate_code)) chk

    FROM #worker_rate

    GROUP BY worker_id

    )

    SELECT worker_id,

    DENSE_RANK() OVER (ORDER BY chk) SNO

    FROM CTE