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