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