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