Home » SQL & PL/SQL » SQL & PL/SQL » GPM
GPM [message #210312] Wed, 20 December 2006 05:33 Go to next message
kkrishna
Messages: 1
Registered: December 2006
Junior Member
Hi,

Can someone help me in getting the query for GPM(Gross Profit Margin).The logic is as follows :

GPM : avgsaleprice-avgitemcost/avgsaleprice *100.

Thanks
Krishna.
Re: GPM [message #210313 is a reply to message #210312] Wed, 20 December 2006 05:37 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Ok - what problem are you having?
Re: GPM [message #210429 is a reply to message #210312] Wed, 20 December 2006 16:17 Go to previous message
Bill B
Messages: 1484
Registered: December 2004
Senior Member
If you are asking how to do it for an entire table then try


select ((avg(saleprice) - avg(itemcost)) / avg(saleprice)) * 100
from myfile;



Previous Topic: Counting in a subquery
Next Topic: record type - Urgent help required
Goto Forum:
  


Current Time: Sun Dec 11 04:09:58 CST 2016

Total time taken to generate the page: 0.10306 seconds