iloveplushies logo

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