1
如何在linq中写入?如何选择最高支数,总和
//The store with the most occurrence
SELECT TOP 1 [StoreName], COUNT(*)
FROM [Xpenses]
GROUP BY [StoreName]
ORDER BY COUNT(*) DESC
//The store where the user spent the most overall
SELECT TOP 1 [StoreName], SUM([Price])
FROM [Xpenses]
GROUP BY [StoreName]
ORDER BY COUNT(*) DESC
感谢您的帮助
对不起,我忽略了这个事实。请参阅编辑 – Richard77