Choose "copy the results of screening to other locations"
List of areas: sheet1!a:b
Conditional areas: randomly point to a blank cell
Copy to: sheet2!a1
Check "Select non-repeating records"
OK
Then fill in c2 in sheet2
=SUMIF(sheet1!A:A,A2,sheet1! !C:C)
Fill down
Fill in d2 of sheet2
=MAX(IF(sheet1!A:A=A2,sheet1!D:D))
Press Ctrl+Shift+Enter at the same time
Fill down