I have a select satement below;
select * from
(select *, row_number() over(order by [ID]) seq from [MyDatabase].[dbo].[MyTable]) x
where seq between 16 and 30
How do i filter the results above so that only ID are displayed that are also in the statment below?
SELECT [ID] FROM [MyDatabase].[dbo].[MySecondTable]) Where [best]='5'