I have a table (name, date, stat1, stat2, stat3), (name, date) is the PK. When I insert rows, there will be duplicate keys, and I need to sum up th
(name, date, stat1, stat2, stat3)
(name, date)
Add a computed column (sum) and include that in your PK.
However, this does denormalize your table. You could use a surrogate key and do the calculation in your SELECT