SELECT DISTINCT p.id,p.[markaID],p.[retail_store_price],p.[Categories] FROM [products] AS p WHERE (CHARINDEX(',58,', p.categories)>0 OR p.categories='58') | Timer 0: 1 ms | Timer 1: 37 ms | Timer 2: 3 ms | pagerTotal=2 | filtering=False | Timer 3: 600 ms | catID=58 | kz.count=0 | title DESC | title | Timer 4: 0 ms | SELECT DISTINCT [id] FROM (SELECT Row_Number() OVER ( ORDER BY p.title DESC) AS RowIndex, p.id FROM [products] AS p WHERE p.id IN(8668,8669)) AS Sub WHERE Sub.RowIndex >= 1 AND Sub.RowIndex <= 12;