serializer
Programmer
I have this SQL:
What I would like to do is to group rows on VATId and SUM those group rows on Price. Is it possible to do this? Thank you.
SQL:
select c.Name,cu.CompanyName,OfficialId,OrderOption, c.code + o.VATId as VATId,
cast(round(TotalPriceIncVATSEK,0) AS decimal(10,0)) as Price,pp.Name as PaymentProcessor
from [order] o, customers cu, countries c,paymentprocessor pp
where paid = 1 and o.vatid !='' and vatadded = 0
AND tradedate >= '2012-01-01 00:00:00' AND tradedate < '2012-02-01 00:00:00'
AND c.code = cu.country
AND cu.customerid = o.customerid
AND pp.id = o.paymentprocessorid
AND c.code not in ('SE')
What I would like to do is to group rows on VATId and SUM those group rows on Price. Is it possible to do this? Thank you.