• for what it's worth, I can give you a little simplification. The partitioning query doesn't have to be stated twice:

    select acct.[Name], cont.fullname, cont.createdon

    FROM [AccountBase] acct

    JOIN (SELECT accountid, fullname, createdon

    , ROW_NUMBER() OVER (PARTITION BY [AccountId]

    ORDER BY createdon Desc) ROW_NUM

    FROM [ContactBase]) cont

    on cont.[AccountId] = acct.[AccountId]

    where cont.ROW_NUM <= 3

    order by acct.[Name], cont.fullname

    You could have joined lvt directly to the sub query removing the middle level of nesting.

    I'm betting this is vastly superior in performance to APPLY.