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.
我很难让它发挥作用。我有一个看起来像这样的表:
quantity cost -------- ---- 5 150 2 100
我想选择一个应该是的结果950。当我按全部数量使用组时,乘以全部成本
950
SELECT SUM(quantity*cost) as sum FROM table