我该怎么做呢
从 MyTable 中选择前 10 名 Foo
SELECT TOP (30) Item, Descripcion, SUM(Amount) AS Suma
FROM Venat
GROUP BY Item, Descripcion
ORDER BY Suma
在 Linq 到 SQL 中?
仅按项目分组,而不按描述分组
var filtroprimeros30 = from nuevo in registrosVipDosAños
group nuevo by nuevo.Item into g
select new
{
Item = g.Key,
Suma = g.Sum(nuevo => nuevo.Amount)
};