Browse our collections
DECLARE @__GetValueOrDefault_1 int = 12;
SELECT [t0].[CollectionProductId], [t0].[CollectionId], [t0].[ProductId]
FROM (
SELECT DISTINCT [c].[CollectionId]
FROM [CollectionProduct] AS [c]
WHERE [c].[CollectionId] IN (8, 2, 107, 40, 34, 27, 35, 94, 12, 115, 17, 23, 42, 93, 25, 41, 28, 83, 104, 109, 26, 106, 105, 1, 39, 29, 24, 16, 108, 7, 103, 45, 110, 11, 206, 33, 225, 226, 61, 60, 253, 222, 232, 57, 223, 54, 30, 18, 111, 51, 62, 49, 37, 56, 14, 233, 47, 300, 92, 224, 221, 43, 218, 20, 64, 36, 46, 50, 254, 53, 112, 219, 217, 19, 63, 3, 264, 229, 52, 84, 10, 113, 90, 59, 298, 44, 6, 88, 38, 85, 13, 220, 48, 4, 58, 114, 32, 91, 89, 55, 21, 227)
) AS [t]
INNER JOIN (
SELECT [t1].[CollectionProductId], [t1].[CollectionId], [t1].[ProductId]
FROM (
SELECT [c0].[CollectionProductId], [c0].[CollectionId], [c0].[ProductId], ROW_NUMBER() OVER(PARTITION BY [c0].[CollectionId] ORDER BY NEWID()) AS [row]
FROM [CollectionProduct] AS [c0]
) AS [t1]
WHERE [t1].[row] <= @__GetValueOrDefault_1
) AS [t0] ON [t].[CollectionId] = [t0].[CollectionId]