我有这个问题:
SELECT finished.first_name, sum(manpower_used.salary) AS 'salary',
materials_used.qty * materials_used.price AS 'Total'
from finished
INNER JOIN manpower_used ON finished.order_number=manpower_used.order_number
INNER JOIN materials_used ON manpower_used.order_number=materials_used.order_number
我得到了这个输出:
first_name |工资|总计为Aaron Sean | 840 | 32.5
我在我的工资栏中得到了错误的输出,正确的输出应该是210(因为我的工资栏中有3个70)但它给了我840
提前谢谢你。