ilovefitness logo

Browse our collections

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