SELECT TOP 20 a.*
FROM
(
SELECT ROW_NUMBER() OVER( ORDER BY a.Open_Date_Int DESC, a.Title ASC, a.CategoryID DESC )
AS RowNumber,
a.CategoryID, a.Title, a.Open_Date, a.PictureID, a.PSrpBaht, a.P2, a.P7, a.ShipUnit, a.BoomRate,
b.P_TYPE, b.P_TABLE,
dis.DistributorNameWeb , dis.Import
FROM PRODUCT_HEAD a
LEFT JOIN PRODUCT_TYPE AS b ON a.P_ID = b.P_ID
LEFT JOIN DISTRIBUTOR AS dis ON a.DistributorID = dis.DistributorID
WHERE a.Status = 1 AND a.WebStatus = 1 AND a.SaleStatus = 1
AND dis.Import = '0'
) AS a
WHERE RowNumber BETWEEN 9841 AND 9086
Product | BoomerangShop.com - Thailand Online Blu-Ray, DVD, CD Store