Home » Developer & Programmer » Reports & Discoverer » average of totals
average of totals [message #89116] Sat, 04 October 2003 06:42 Go to next message
Paul Lettieri
Messages: 1
Registered: October 2003
Junior Member
Hi:

This is my first post...so I am not sure I am in the coorect forum...I will aske the question anyway. I am a user on a Discover 9i and was wondering how one goes about getting averages of totals. That is, I have a calculated field that shows a gross margin percentage for each line item based on a sales field and a gross margin field. How can I get the "totals" of the Sales dollars and the "totals" of the gross margin dollars to reflect a gross margin percent. Averaging the column "gross margin %" does not product the same result.

Thanks for looking
plettieri
Re: average of totals [message #89117 is a reply to message #89116] Sat, 04 October 2003 08:14 Go to previous message
Mark
Messages: 284
Registered: July 1998
Senior Member
Try this;
select job_id,job_title,max_salary,
rpad(trunc((max_salary/sum(max_salary) over()),2),4,'%') as av from hr.jobs;
Previous Topic: Like to Know if Oracle report server supports post request from Java Application
Next Topic: rep-0002 unable to open report
Goto Forum:
  


Current Time: Tue Apr 16 15:07:23 CDT 2024