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