select column1,sum(column2*column3)as col from yourtable
group by column1
union all
select '' column1,sum(column2*column3)as col from yourtable
order by column1
这只是一个简单的总和
Quantity*Price
:
SELECT SUM(Quantity*Price) AS result FROM tablename
你似乎不需要任何分组。