How can I Calcualte the geometric mean in oracle 10g

dear all
plz I need a function to calculate the geometric mean
I uses oracle 10g
thanks in advance

Hi,
Solomon Yakobson wrote:
select  power(10,sum(log(10,val)) / count(*))
from  value_table
I'm sure you meant count *(val)*, not count (*).
You can also use AVG instead of SUM and COUNT.
There's nothing specail about the number 10; any number greater than 1 will do; just be sure to use the same number in both POWER and LOG. If you used e, that would be equivalent to using EXP and LN instead of POWER and LOG, so why not use EXP and LN in the first place?
SELECT       job
,       power(10,sum(log(10,sal)) / count(*))     AS gm1
,       POWER ( 2
          , AVG (LOG (2, sal))
          )                    AS gm2
,       EXP (AVG (LN (sal)))               AS gm3
FROM       scott.emp
GROUP BY  job
ORDER BY  job
;Output:
JOB              GM1        GM2        GM3
ANALYST         3000       3000       3000
CLERK     1021.02742 1021.02742 1021.02742
MANAGER    2748.9445  2748.9445  2748.9445
PRESIDENT       5000       5000       5000
SALESMAN  1391.57884 1391.57884 1391.57884

Similar Messages

  • How can i download the latest dumps for oracle 10g

    how can i download the latest dumps for oracle 10g

    It's NOT permissible to use Oracle dumps for passing certification exams!
    Please, refer to below links for more information about "using dumps"
    http://www.certguard.com/braindumps.asp
    http://ivan.kartik.sk/index.php?show_article=39
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

  • How can we do the data migration between Oracle Applications and SAP R/3.

    Hi All,
    How can we do the data migration between Oracle Applications and SAP R/3 system.What are all the possible ways to move bulk data from Oracle Apps to SAP r/3 system.
    Provide any 3rd party tools which supports data migration and also pls rpovide the SAP's own data migration tools with supports the above feature.
    Awaiting for best possible solution.
    Thanks in advance.
    Regards
    Dharmaraju

    the 3rd party tool is ETL , you can use ETL tool and the prepare the load files then you can use LSMW method to upload the data to SAP.

  • Can we rename the database name in oracle 10g

    Hi,
    Can we rename the database name in oracle 10g.
    Please help

    Yes as already said, using DBNEWID Utility can renamed the database name.
    You can also take a look at the Oracle Metalink Note:429674.1 (Which was written by me) - Subject: How We Used the Oracle DBNEWID Utility to Change the Database Name
    Regards,
    Sabdar Syed.

  • Where can I download the ODBC driver for Oracle 10g XE?

    where can I download the ODBC driver for Oracle 10g XE?
    I need the ODBC drivers for windows 7 x64, I installed Oracle Database 10g Express Edition, the use and connects with RazorSQL well, I just want to make a connection THROUGH ConnectionString language using the ODBC driver

    already checked these http://www.connectionstrings.com/oracle, I need Help Please.

  • How can we know the password for a oracle user

    Hi to All,
    Can any one help me plz how can we know the password for any user in oracle.
    Regards
    dxb_dba

    Assuming one wants to stay with database-stored passwords (the traditional method), one may want to look at the password aging and complexity enforcing mechanisms.
    Oracle has a complete manual around this. For 10gR2, the Oacle Database Security Guide chapter 4 is interesting reading - section 4.3 is the discussion for database authentication. And section 7.4.4 talks about the complexity enforcement.
    Message was edited by: Hans Forbrich - reworded so it is not misinterpreted as directed at an individual.

  • Can't Create the ODBC connection for Oracle 10g

    Hi,
         I am working with Oracle 10g Database Release 2 in windows XP professional. I am trying to create an ODBC connection for oracle but become failure because its generating the following errors:
    system error code 998
    could not locate the setup or translator library
    Please help me how can I solve this problem and create the ODBC connection for oracle 10g database.
    Best Regards,

    mwz wrote:
    I am trying to create an ODBC connection for oracle but become failure because its generating the following errors:
    system error code 998
    could not locate the setup or translator libraryThe symptom described is typical of an incorrect system env PATH setting (used by the data source admin tool), compared to that of the Oracle Home (specifically, path $OH/bin). The odbc driver config routine will search directories listed in PATH variable for necessary libraries (Client dll's). If some library fails to load (from e.g. oraoci*.dll or oraclient10.dll) it will probably error out, as in your case.
    Are you creating the odbc dsn on the databse server host or on some other machine? I.e. are you using the db host as a client or not?

  • How can I Export the Image file into Oracle Table

    <tt>
    Hi Folks,
    I have one requirement with me, but i can't able to find the solution for that, so kindly any one give a suggestion for my requirement.
    Let me explain my requirement in detail.. I have one table called SIGN this table contain customer signature image as well as the image of the customer. The SIGN have the following columns
    </tt>
       CREATE TABLE SIGN
      ID                    VARCHAR2(50 BYTE)            NOT NULL,   "This column containing the Customer ID"
      IMAGE_C_FLAG          CHAR(1 BYTE)                 NOT NULL,   "This column containing the whether ID belong to Signature or Photo"
      IMAGE                 BLOB,                        NOT NULL,  "This Column Containing the Image "
      ENTERED_C_BY          VARCHAR2(10 BYTE)
    The SIGN having the following values
    ID                                                 C I IMAGE
    23900033                                           Y S  (BLOB)
    23900034                                           Y S  (BLOB)
    23900035                                           Y S  (BLOB)
    23900036                                           Y S  (BLOB)
    23900042                                           Y S  (BLOB)<tt>
    I want to export those Image from Table into my machine local folder with the extension of .JPEG(C:\IMAGE)
    How can i do that in oracle... please kindly any one give the solution for this..
    This is my Oracle server version
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Prod
    PL/SQL Release 10.1.0.2.0 - Production
    CORE 10.1.0.2.0 Production
    TNS for 32-bit Windows: Version 10.1.0.2.0 - Production
    NLSRTL Version 10.1.0.2.0 - Production
    Thanks in Advance
    Arun
    </tt>

    Hi Arun,
    Please view the below links. Hope these helps you as there are also of similar discussion.
    Insert Picture (image) using oracle forms
    Insert Picture (image) using oracle forms
    insert image to atable in forms builder
    Re: insert image to atable in forms builder
    Thanks,
    Balaji K.

  • How can I use the FTP server on Oracle XML DB for plain text files?

    Hi,
    I need to generate comma separated files for download via FTP. The files are generated from Oracle Table data and should be published on a FTP Server. Would it be able to use the FTP Server on Oracle XML DB?
    If not, any suggestions?
    Thanks
    Frederik Christensen

    You can create a temporary CLOB with your CSV content, and then folder the CLOB into the XDB repository with DBMS_XDB.createRESOURCE()...
    This would work fine....

  • How Can I load JRE 1.6 in oracle 10g

    Dear All,
    My development team developed few classes which are using feature of JDK 1.6. But when they compile those classes in Oracle 10g, it raises few errors.
    Should I have to install/load JRE 1.6 in oracle 10g. Presently there lesser than this ver. Please also let me to know how I can?
    Aqeel Nawaz

    Dup How can I change SGA_TARGET IN Oracle 10G.

  • How can i understand the differents logs in oracle rac?

    I need to check if everything is running ok

    Interesting check list.
    But to check (RMAN) backup I would add something like:
    RMAN> list backup completed after 'SYSDATE-1';or
    RMAN> report need backup;I would also add some periodic recovery tests.

  • How can i let Displaytag work in an Oracle 10g Portal environment?

    Hi there,
    I'm already searching and trying this for a week, but didn't succeed yet.
    I want to use displaytag to be able to sort and page data in a HTML table on a very generic and easy-to-use way.
    Locally in JDeveloper 10.1.3 on OC4J (embedded) it works like a charm (even exporting with the export filter).
    On portal...it "sucks" :-s ... It doesn't work at all. It displays the data, but when i click a column for sorting, or a another page of the displaytag an error occurs.
    If i do nothing (except giving requestURI="") , the portal suddenly displays it's toplevel page.
    If i try to compose the requestURI in the JSP itself, and get the approximate URI that the oracle portal needs, the action is called, but apparently our http session is invalidated, i get nullpointers of an object that should be on the request.getSession(), but it is null there.
    I already tried something like implementing the PortletRequestHelper and PortletHref , but therefore i need access to the request (or pageContext?) attributes renderResponse and portletRequest, that should be in the request or page as an attribute with a given name.
    I have already printed all session, request and pagecontext attributes and their names in a header.jsp (included like <%@ include file="header.jsp"%> ) , but no objects like javax.portlet.PortletRequest or javax.portlet.RenderResponse appear to be there.
    So i can't fetch them from the PageContext attribute in my custom PortletRequestHelper implementation.
    Well :-s I need help urgently. Can anyone give me more information to this? I already googled, searched different sources, addressed some colleagues here, and nothing could help me. You, Oracle experts, are my last hope. (Normally, i have a colleague who is very known with Oracle Portal, Oracle expert in our company, but he's ill).
    It must have something to do with a wrong URL, but i checked the URL generated by portal for a tab that we can click to change pages, and the URL generated by portal on the displaytag column headers ... (in my current code with the hand-written requestURI in the JSP itself) , and it is completely the same, only 2 request parameters are added. If i click the column, it gives a nullpointerexception on an object that should be on the session but is null.
    If you need more information, i'll be so kind as to answer your questions.
    I hope this explanation was clear enough :-s i'm quite aggitated that i can't get this wonderfull displaytag working in oracle portal.
    Kind regards,
    Steve

    Hi there :-)
    Thanks already for your replies.
    Well, i checked PortletRenderRequest and responses already ... But well ...
    I have to re-implement the PortletRequestHelperFactory to allow displaytag to generate the links.
    Displaytag expects me to make a PortletRequestHelperFactory (AbsentPortletRequestHelperFactory --> The project call Absenteisme ... employees that are absent from work are registered) that gives a pageContext parameter to an AbsentPortletRequestHelper.
    The PortletHref that i need to re-implement (AbsentPortletHref), is constructed using a PortletRequest and a PortletResponse parameter, like the default PortletHref in de Displaytag-Portlet source.
    PortletRequest and PortletRenderRequest aren't the same, this gives ClassCastExceptions, and other problems. I already tried using wrappers but can't find anything that works.
    :-s
    I really don't know further what to do, except indeed working with the correct objects, but how then override those porltet helper objects.
    Anyone experience with sorting / paging displaytag in oracle portal ? (I already read that export of displaytag data might pose problems in oracle portal, but this isn't a primary concern ... first i need sortable and pageable data working in Oracle Portal).

  • How can I creat OLAP cube by using Oracle 10g

    i want to creat a complete Molap cube, but i find that i cannot do it in Oracle Database 10g,Analytic Workspace ...
    What are the systems needed in creating Cube? How to do that?

    Please refer to the OLAP Application Developer's Guide (10.1.0.4) found at:
    http://www.oracle.com/technology/products/bi/olap/olap.html
    By the way, the doc highlights Analytic Workspace Manager 10g for Oracle Database 10.1.0.4.0. The required RDBMS 10.1.0.4.0 patch set should be available any day now on MetaLink for Linux and Windows. Soon thereafter, the AWM 10g client will be posted as a stand-alone to OTN and MetaLink.

  • How can we edit the workbook

    hi
    how can we edit the workbook means i am having a workbook with some queries, i want to change the name of the workbook how we do this?
    Can any one provide me the solution
    Thanks in Advance.

    Hi,
    In our case, even though i change the name of the workbook using 'Change title' that is not reflected in the workbook if it is in a role. so, in that case, goto pfcg - enter the name of the role -> menu tab -> change the workbook name for the workbook of your choice.
    Thanks

  • I have a problem with elements 8. When ever I start a new project, the program searches for the old, latest used filmmaterial, I have used before. That means, if I use a different DVD, it take so much time, until the program starts. So how can I stopp the

    I have a problem with elements 8. When ever I start a new project, the program searches for the old, latest used filmmaterial, I have used before. That means, if I use a different DVD, it take so much time, until the program starts. So how can I stopp the automatically uploading of old material?
    Thanks

    You have 2 unreachable statements in this method.
    public static int eval(String s2, String op, String s3) {
    return lookup(s2);
    return lookup(op);
    return lookup(s3);
    } You're missing a } at the end of this method:
    public static int lookup(String s) {
        for(int k = 0; k < symbols.length; k++){
            String symbol = symbols[k];
            if(s.equals(symbol))
                return k;
        }You have some loose } and ; at the end of the file:
    public static void main(String args[])
    commandline();
    }

Maybe you are looking for

  • Alternate code

    can any one provide me alternate code for following statement using 1.READ from internal table, 2. by using "for all entries". <u>following is the code</u> *TABLE J_5HPDBEAR LOOP AT gt_cr INTO gs_cr.    SELECT *  FROM j_5hpdbear WHERE annuser = gs_cr

  • Ibook g4s / dying out?

    is it just me or does there seem to be a noticeably greater number of 'ibook, blue or black screen, hard drive dying, cold restart, etc ...' posts lately? i wonder because my 5 year old machine just gave up the ghost on the weekend. (yes, it was due

  • Video on a Nano

    I'm a first time iPod user and I wanted to know if there's a way to watch movie clips on an iPod Nano. Dell Inspiron E1505 and too many to list here   Windows XP   1st Gen Nano, Creative MuVo v100, and too many to list here

  • What's purpose of OAMK

    Hello SAP Professional 1. In t code OAMK, I have removed the u201CAssetsu201D reconciliation indicator settings (column name Recon.account for acct type) and made that line as blank for GL account for 111 to 115 for e.g 2. Then I run FAGL_FC_VAL for

  • How do I copy from ITUNES (30 gigs) to a flash drive (32 gigs). Help

    How do I copy from ITUNES (30 gigs) on my Powerbook (OS X) to a flashdrive (32 gigs)?