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