In the result set you want to records differ only in the T2.Amount field so T2 must be part of the primary key if the records are to be unique (they should always be unique). But since it can be NULL, it can't be part of a PK. If you had 3 or more T1 records matching the T2 record then you would end up with 2 rows that were identical and lose the ability to tell individual transactions apart.That said, something like this will do what you want.select T1.uniqueID, T1.account, T1.Date, T1.Amount, (case T1.uniqueID = (select min(uniqueID) from T1 AS firstTrans where T1.Date = firstTrans.Date and T1.account = firstTrans.account and T1.amount = firstTrans.amount) then T2.Amount else NULL end) AS Amountfrom T1 left join T2 on T1.Date = T2.Date and T1.account = T2.account and T1.amount = T2.amount
mono