Re: Compute in Oracle

From: maya <maya_java_at_yahoo.com>
Date: 23 Feb 2005 08:09:25 -0800
Message-ID: <1109174965.270408.91080_at_l41g2000cwc.googlegroups.com>


Mahesh,

Thanks for ur suggestion, but my avg is different from the one in ur example.
Can u please check the example I have posted ?

In your example, u r calculating average of 1 column, thats is possible. In my case,its different.
Mahesh Rajendran wrote:
> mag_at_mutation_mutation > break on job
> mag_at_mutation_mutation > compute sum of sal on job
> mag_at_mutation_mutation > compute avg of sal on job
> mag_at_mutation_mutation > /
>
> JOB ENAME SAL
> --------- ---------- ----------
> ANALYST SCOTT 3000
> FORD 3000
> ********* ----------
> avg 3000
> CLERK SMITH 800
> ADAMS 1100
> MILLER 1300
> JAMES 950
> ********* ----------
> avg 1037.5
> MANAGER JONES 2975
> CLARK 2450
> BLAKE 2850
> ********* ----------
> avg 2758.33333
> PRESIDENT KING 5000
> ********* ----------
> avg 5000
> SALESMAN ALLEN 1600
> MARTIN 1250
> TURNER 1500
> WARD 1250
> ********* ----------
> avg 1400
>
> 14 rows selected.
Received on Wed Feb 23 2005 - 17:09:25 CET

Original text of this message