>Hi
>
>I can't remember how to do this.
>
>I have two tables with a join
>
>Table Contact has multiple rows for each row in table Individual.
>
>I only want to return the earliest row in table Contact for each row in Table Contact. Each row in table contact has a created date and they are joined on individual_ref
>
>How do I do that ?
>
>Thanks
SELECT * FROM Individual I
OUTER APPLY (SELECT TOP 1 * FROM Concact C ON C. individual_ref = I.refkey ORDER BY date)