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