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