Try this out (untested, no access to SQL server at the moment)with notes as ( select CustomerNo, NoteDate, NoteText rn = row_number() over(partition by CustomerNo order by NoteDate desc) from Notes ) select CustomerNo, max(case when rn = 1 then NoteDate end) as NoteDate1, max(case when rn = 1 then NoteText end) as NoteText1, max(case when rn = 2 then NoteDate end) as NoteDate2, max(case when rn = 2 then NoteText end) as NoteText2, max(case when rn = 3 then NoteDate end) as NoteDate3, max(case when rn = 3 then NoteText end) as NoteText3,from noteswhere rn <= 3group by CustomerNo