I have a query below that is returning individual sales records with amounts for each order placed for a specific product SKU. How would I go about summing the total amount? The column is "extprice" that I need to sum. Any help would be appreciated, thanks...
select partno4pt,orders.orderdate,orders.processdate,orderdetails.qty,orderdetails.extprice
from orderdetails
inner join orders
on orderdetails.order_id = orders.order_id
where orderdate > '2009.01.17 09:00:00'
and partnumber like '%m9150%'
and orders.processdate is not null