Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> SQL question: figuring percents on totals

SQL question: figuring percents on totals

From: Anthony Valentine <amv_at_sbsalaska.com>
Date: Fri, 18 Jun 1999 12:01:29 -0800
Message-ID: <376AA599.78197E03@sbsalaska.com>


Hello everybody!!

I have a quick SQL question that I am hoping someone will be able to answer.

I am running a sql report that gives out that looks like the following:

Item  #    Sales                 Cost                     Profit
GP%
------  --------      -------             -----      ----
20            $36,311.13       $26,834.46        $9,476.67   26.10 %
30            $1,038.12         $607.22              $430.90      41.51
%
40            $538.49            $281.00              $257.49      47.82
%
..
..
..

------ ---------- ---------- -------- ------- Total: $99,637.10 $72,678.05 $26,959.05

Can someone tell me how to figure the gross profit % (sales/profit) for the totals?
I just can't seem to figure this one out. I hope that it's possible and I am just missing something simple.

An e-mailed response would be nice (to the address below), as I will be out of town next week.

Thanks in advance!!

Anthony Valentine
fiveten_at_micronet.net
Spenard Builders Supply Received on Fri Jun 18 1999 - 15:01:29 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US