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