I am of the opinion that the query below can be written using a windowing function instead of the self join.
Can anyone help with this please.
FROm #hold a
where TransactionDate = (SELECT MAX(TransactionDate) FROM #hold b where b.PersonURN = a.PersonURN and b.DealerID = a.DealerID)
View Complete Post