SELECT Institution_Number, Attached_Account_Number, [1]=MAX([1]), [2]=MAX([2]), [3]=MAX([3])... (at the end add the following):GROUP BY Institution_Number, Attached_Account_Number