• select HName, USERname, max(EndDate) as max_enddate

    from #Info

    where Description = 'Client'

    group by HName, USERname

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **