Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个看起来像这样的查询:
SELECT Name, SUM(Price * Quantity) AS Total FROM Sales WHERE Date = " + ddItems.SelectedItem + " GROUP BY Name
如何显示前 10 个总数?
在 MySQL 中,可以使用 LIMIT 子句限制行数,因此您可以将其添加到查询中以获得前 10 名:
ORDER BY Total DESC LIMIT 10