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.
我遇到了这个漂亮的链接 -如何在 MySQL 中返回数据透视表输出?
这解决了我的确切问题。但是,我需要其中一列作为值的总和 - 这是一个金额列
如何在查询中添加列的总和。请指教。
试试这个查询:
SELECT SUM(column_name) FROM table_name WHERE condition;