I have a Products table on SQL Server. How can I select a random row from the top 10 rows - ranked by sales_count?
After finding an answer for how to select random rows, this is what I have so far:
SELECT * FROM (
SELECT TOP 1 * FROM
(
SELECT TOP 10 *
From Products
ORDER BY "sales_count" DESC
) a
ORDER BY NEWID()) b
)
But I'm not sure it's correct?