score:1

Accepted answer
select [t3].[customerid] as [id], [t3].[contactname] as [name], (
    select count(*)
    from [customers] as [t4]
    ) as [count]
from (
    select [t2].[customerid], [t2].[contactname], [t2].[row_number]
    from (
        select row_number() over (order by [t1].[contactname]) as [row_number], [t1].[customerid], [t1].[contactname]
        from (
            select top (10) [t0].[customerid], [t0].[contactname]
            from [customers] as [t0]
            order by [t0].[contactname]
            ) as [t1]
        ) as [t2]
    where [t2].[row_number] > @p0
    ) as [t3]
order by [t3].[row_number]

Related Query

More Query from same tag