I'm about one click from getting this done and so any help would be great I have this sql code I wrote in Oracle:
SELECT DISTINCT
O.shipcountry, S.companyname,
O.orderid,
TO_CHAR(O.freight, '$999,999.999'),
TO_CHAR(sum(unitprice)*count(quantity), '$999,999.99') as "Order Total"
FROM corp.Order_Details D
LEFT JOIN corp.Orders O ON D.orderid = O.orderid)
LEFT JOIN corp.Shippers S ON O.shipvia = S.Shipperid
WHERE O.freight >= '500'
GROUP BY O.shipcountry, S.companyname, O.orderid, to_char(O.freight, '$999,999.999');
This basically gives me an orderid, country it was shipped to, shipper name, order total and the total amount of freight that was charged.
Question
Without making this too complicated, does anyone know how I could write in the percent of freight (freight/order total)? I tried to put it in but it says that it cannot be grouped because of the sum in the order total. If anyone has any ideas on how and where I should write this line I would really, really appreciate.