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 (39, 109, 110, 24, 23, 29, 106, 104, 27, 2, 40, 42, 105, 17, 7, 83, 16, 103, 8, 11, 28, 107, 34, 1, 93, 115, 25, 108, 45, 12, 26, 94, 35, 41, 20, 4, 298, 206, 227, 62, 38, 13, 44, 84, 43, 46, 63, 113, 220, 89, 55, 30, 61, 10, 60, 51, 54, 3, 224, 300, 222, 226, 53, 90, 64, 219, 32, 36, 21, 50, 217, 218, 58, 111, 59, 52, 14, 48, 57, 19, 91, 254, 253, 56, 88, 6, 264, 49, 37, 225, 223, 229, 18, 233, 232, 47, 33, 112, 92, 221, 114, 85)
) 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]