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