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