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