Mean,Median and Mode in Oracle 9i

Hello Users,
Is there any analytical functions for MEAN,MEDIAN and MODE in Oracle 9.7.2 ? In Oracle 10g I could see these functions.
Appreciate your help.
Regards,
Ravi

Hi Ravi,
user13153556 wrote:
Hello Users,
Is there any analytical functions for MEAN,MEDIAN and MODE in Oracle 9.7.2 ? Do you mean Oracle 9.<b>2</b>?
All built-in functions are listed in the SQL Language manual:
http://download.oracle.com/docs/cd/B10501_01/server.920/a96540/index.htm
In Oracle 10g I could see these functions.You can use PERCENTILE_CONT or PERCENTILE_DISC to get the median in Oracle 9. You can also use ROW_NUMBER.
I don't see MEAN or MODE even in Oracle 10.
Use AVG for mean.
ROW_NUMBER is one way to find the mode.

Similar Messages

  • How should I correct my code to find the mean, median & mode from an array?

    Hello everyone,
    I have been learning Java for about a month now and am stuck with the following code. There are no highlighted errors on my program when typing it into Eclipse but I get an error message when I try to run my program.
    Here is the code:
    import java.util.Random;
    * <dl>
    * <dt>Purpose:
    * <dd>Example program that randomly generates, collates and outputs numbers.
    * <dt>Description:
    * <dd>This program generates 10000 random numbers between 0 and 99 inclusive.
    * It also keeps count of how many times each number is generated and prints these
    * counts out to the screen in the format of mean, median and mode.
    * </dl> 
    * @author  Woodie Woodpeck
    * @version $Date: 2008/10/27 14:44:00 $
    public class Exercise3Point08
         public static void main(String[] args)
                   int[] counts=new int [100];
                   for(int i=0;i<100;i++)
                        counts=0;
                   Random r=new Random();
                   for(int n=0;n<10000;n++)
                        counts[r.nextInt()%100]++;
                   double sum=0.0;
                   int maxCnt=0;
                   int mode = 0;
                   int runningCount=0;
                   int median = 0;
                   for (int i=0;i<100;i++)
                        sum+=(i*counts[i]);
                        if (counts[i]>maxCnt)
                             mode=i;
                             maxCnt=counts[i];
                        if (runningCount<5000&&(runningCount+counts[i])>=5000)
                             median=i;
                        runningCount+=counts[i];
                   System.out.println("Mean =" + (sum/10000));
                   System.out.println("Median =" + median);
                   System.out.println("Mode =" + mode);
    Here is my error message:Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    And that's it. Hmmmm. Strange. I hope someone can help.
    Many Thanks
    Wood                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Hi Edward,
    I moved the file from my college computer to my home computer using a USB stick and changed the workspace path on my Eclipse software to match the files that I transferred. I also cleared out a lot of random code that I had lying around my hard-drive before trying to use the code that I pasted above.
    From reading the output I guess there is a problem with the class. Do you think I might have transferred the file from one computer to another incorrectly? Do you know how I can clean and rebuild a project? Eclipse seems quite daunting and awfully complicated for a beginner!
    Thanks
    Wood

  • When I connect Apple TV to my samsung tv, I get a message that says: mode not supported......what doe this mean ? And how do I fix it

    When I connect Apple TV to my samsung tv I get a screen message that says ...mode not supported....what does this mean..and how can I fix it ?   Thanks

    I'd start with the following document with that one:
    iPhone, iPad, iPod touch: How to restart the Apple Mobile Device Service (AMDS) on Windows

  • HT201210 Trying to update my new phone to iOS6. It say my phone is in recovery mode what does this mean. And how do I solve it?

    Trying to update my new phone 4s to iOS6. It says my phone is in recovery mode what does this mean. And how do I solve it please?

    It means exactly what it says.
    Connect the device to iTunes and restore.

  • Archive log mode in oracle 10g

    Hi,
    I would like to know the archive log mode in oracle 10g and I use this code in SQLPlus
    select log_mode from v$database
    But it displayed: "2" not : NOARCHIVELOG or ARCHIVELOG
    It displayed a number, not a String.
    How could I know this?
    Thanks

    Hi Paul
    Because I am a newbie in DBA Oracle so I got many difficulties.
    You are very kind to help me.
    So I have some more questions:
    1. when I executed this code, it always reported error:
    $ tmp=`${ORACLE_HOME}/bin/sqlplus -s / as sysdba << EOF
    set heading off feedback off;
    exit
    EOF`
    tmp='ERROR:
    ORA-01031: insufficient privileges
    SP2-0306: Invalid option.
    Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
    where <logon> ::= <username>[<password>][@<connect_identifier>] | /
    SP2-0306: Invalid option.
    Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
    where <logon> ::= <username>[<password>][@<connect_identifier>] | /
    SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus'
    so when I updated like this:
    tmp=`${ORACLE_HOME}/bin/sqlplus -s sys/syspass@db02 as sysdba <<EOF     
                   set heading off feedback off;
                   exit
                   EOF`
    It run correctly.
    2. With Paul's guide:
    Do not execute Oracle commands from root, execute them as oracle user. This works to me :
    $ tmp=`${ORACLE_HOME}/bin/sqlplus -s / as sysdba << EOF
    set heading off feedback off
    alter database backup controlfile to '${CONTROLFILE_DIR}/<file name>';
    alter database backup controlfile to trace;
    exit
    EOF`
    Of course CONTROLFILE_DIR must be set to a directory with write permission for oracle user.
    For ex: I have an Unix account: unix/unix
    and a Sys Oracle account: oracle/oracle
    I login with Unix acount (unix/unix) and call script file that contains above code.
    tmp=`${ORACLE_HOME}/bin/sqlplus -s oracle/oracle@db02 as sysdba <<EOF     
                   set heading off feedback off
                   alter database backup controlfile to '${CONTROLFILE_DIR}/backup_control.ctl';
                   alter database backup controlfile to trace;
                   exit
                   EOF`
    Unix report as following: Linux error: 13: Permission denied.
    CONTROLFILE_DIR directory is read,write,execute for account unix/unix.
    Of course CONTROLFILE_DIR must be set to a directory with write permission for oracle user. You mean I have to create a Unix user is the same to Oracle user so that Oracle user can have permission to write.
    Please guilde more detail.
    Thanks for your attention.
    Message was edited by:
    user481034

  • Difference between Null in c and Null in Oracle

    Hi,
    Can any one tell me the difference between NULL in C language and NULL in Oracle
    Rds,
    Naga

    > Null is some garvage value in oracle.
    Not sure what you mean.
    AFAIK and not being a C programmer myself, isn't null CHR(0) in C? I'm not sure the two concepts (SQL null and C null) have anything in common.

  • How to print report in Character mode using Oracle Developer 10g

    Dear,
    I migrate my forms and reports from Oracle Developer 6 to Oracle Developer reports 10g,
    We are using some character mode report for bill printing. But when i run these report through menu on Web i got error message like
    "REP-1920: Character mode runtime incompatible with DESFORMAT of PDF, HTML, HTMLCSS, SPREADSHEET or RTF"
    i don't want to change the character mode to any other mode because it effects the printing.
    so how can it possible to set the mode to character and view report on Web.
    pls. suggest me solution.

    You have to pass the PRT file name as value for the DESFORMAT and use mode= MODE=CHARACTER.
    E.g.
    http://<host name>:<port>/reports/rwservlet?desformat=dflt&mode=character&.....

  • My MacBookPro has a white screen with a grey file folder in the center of the screen with a white question mark blinking in it. What does this mean?  And how can I get my computer back up and running normal?

    My MacBookPro has a white screen with a grey file folder in the center of the screen with a white question mark blinking in it. What does this mean?  And how can I get my computer back up and running normal?

    Start up in Safe Mode.
    http://support.apple.com/kb/PH14204?viewlocale=en_US
    Repair Disk.
    http://support.apple.com/kb/PH5836
    Reset PRAM.
       http://support.apple.com/kb/PH14222

  • Export and Import in Oracle

    I need to export users with tables and data from Oracle 8.0.4 and import into Oracle 8.1.7.
    But the condition is that we need to retain the Japanese characters.
    I did this using simple export and import functions but Japanese characters were imported as Junk.
    Can somebody tell me what is the clean way of exporting and importing such that Japanese charaters are not converted to Junk.

    You must set the correct characterset before exporting and importing (I don't know which characterset is correct for you, but choosing the same characterset as the characterset of your database should work).
    Use NLS_LANG environment variable to do this,
    NLS_LANG=<LANGUAGE>_<TERRITORY>.<CHARACTERSET>. On UNIX if NLS_LANG is not set explicitly, it defaults to AMERICAN_AMERICA.US7ASCII, that means all special characters cannot be translated.
    On Windows NLS_LANG is set at installation time, it corresponds to the settings of Windows itself.

  • Using DEBUG Mode in Oracle SQL Developer Data Modeler to Log SQL

    Hello,
    I am looking for the possibilty to enable the logging of SQL in Data Modeler.
    Jeff Smith wrote an article how to do this for SQL Developer, for Data Modeler there are other configuration files. Does anyone have an idea?
    Best regards,
    Joop

    Hello Philip,
    the URL to the article of Jeff is: http://www.thatjeffsmith.com/archive/2012/10/using-debug-mode-in-oracle-sql-developer-to-log-sql/
    in the install directory of Data Modeler 3.3.0.734 exists a file datamodeler\datamodeler\bin\datamodeler.conf. This analogue the situation for sql Developer.
    However in this file there is no reference to a (non)debug file.
    In ide/bin directory there is a ide-logging-debug.conf and ide-logging.conf file. But they are not referenced. Should one of them be included?
    Joop

  • Optimizer mode in oracle 10g

    what is the difference between setting optimizer mode in oracle 10g
    optimizer_mode=choose
    optimizer_mode=all_rows

    user446367 wrote:
    what i have to set for the below parameters . any idea ?
    optimizer_index_caching
    optimizer_index_cost_adjIn general you would leave them set at the default value in 10g (and probably, in most earlier versions, for most cases as well). Even if you were to change them, asking for specific values on an internet forum is rather asking for trouble, it's not dissimilar to asking "what should I set for the parameter processes?" A reasonable value will be application dependent.
    The first parameter reduces the cost of some types of indexed access by assuming that only the specified percentage of index i/o actually results in a physical I/O and therefore only that percentage of the io cost is taken into account. By contrast all tablescan access and the other types of indexed access are assumed to be uncached and therefore need costing.
    The second parameter just arbitrarily scales indexed access path costings.
    You could argue, and some have, that you could calculate a cache hit ratio for index blocks in much the same way as you can calculate a cache hit ratio generally and then set the first parameter to this value. The standout problems with this approach are
    1) It applies to all matching statements and objects not just your problem ones.
    2) It doesn't necessarily even apply to your problem statements.
    3) It doesn't have anything to do with query duration per se, just efficiency of one particular access path.
    4) People tend to choose to round costs down and make the likelihood of two plans getting the same cost and being chosen on a tiebreaker basis higher.
    The second parameter just asks you how much you like the idea of indexes generally. If you are going to change it pick a family members age or something - it'll make you smile every time you see it.
    Niall Litchfield
    http://www.orawin.info/

  • Operation modes in oracle form

    please share difference between enter query mode and normal mode in oracle form precticaly.
    and how can change mode
    Edited by: 964427 on Mar 12, 2013 3:21 AM

    If you are new to Forms or even not new, your best place for answers to questions like this are the Forms Builder Online Help. Open the Forms Builder and from the menu select HELP > ONLINE HELP...
    In the Help window, select either the Index or Search tab and enter something like ENTER QUERY or QUERY PROCESSING

  • Virtex6:Configuration data download to FPGA was not successful. DONE did not go high, please check your configuration setup and mode settings

    Hello,everyone.
    I am using virtex6 FPGA and trying to download mcs file to PROM and have failed.
    I download .bit file to FPGA and succeed.
    When i try to download .mcs file to PROM XCF128X-FTG64C(BPI Flash) and choose Slave SelectMAP Mode
    and the process is about 68% it fails.
    The message below the IMapct is as belows:
    done.
    PROGRESS_END - End Operation.
    Elapsed time =      0 sec.
    // *** BATCH CMD : identifyMPM
    // *** BATCH CMD : assignFile -p 1 -file "C:/Users/Administrator/Desktop/TEST/LED/led.bit"
    '1': Loading file 'C:/Users/Administrator/Desktop/TEST/LED/led.bit' ...
    done.
    INFO:iMPACT:2257 - Startup Clock has been changed to 'JtagClk' in the bitstream stored in memory,
    but the original bitstream file remains unchanged.
    UserID read from the bitstream file = 0xFFFFFFFF.
    INFO:iMPACT:501 - '1': Added Device xc6vlx240t successfully.
    INFO:iMPACT - Current time: 2014/3/13 8:48:14
    // *** BATCH CMD : Program -p 1
    PROGRESS_START - Starting Operation.
    Maximum TCK operating frequency for this device chain: 66000000.
    Validating chain...
    Boundary-scan chain validated successfully.
    INFO:iMPACT - 1: Over-temperature condition detected! [ 230.52C >  120.00C]
    1: Device Temperature: Current Reading:  230.52 C, Max. Reading:  230.52 C
    1: VCCINT Supply: Current Reading:   2.997 V, Max. Reading:   2.997 V
    1: VCCAUX Supply: Current Reading:   2.997 V, Max. Reading:   2.997 V
    '1': Programming device...
     Match_cycle = NoWait.
    Match cycle: NoWait
     LCK_cycle = NoWait.
    LCK cycle: NoWait
    done.
    INFO:iMPACT:2219 - Status register values:
    INFO:iMPACT - 0011 1111 0111 1110 0100 1011 1100 0000
    INFO:iMPACT:579 - '1': Completed downloading bit file to device.
    INFO:iMPACT:188 - '1': Programming completed successfully.
     Match_cycle = NoWait.
    Match cycle: NoWait
     LCK_cycle = NoWait.
    LCK cycle: NoWait
    INFO:iMPACT - '1': Checking done pin....done.
    '1': Programmed successfully.
    PROGRESS_END - End Operation.
    Elapsed time =     23 sec.
    Selected part: XCF128X
    // *** BATCH CMD : attachflash -position 1 -bpi "XCF128X"
    // *** BATCH CMD : assignfiletoattachedflash -position 1 -file "C:/Users/Administrator/Desktop/TEST/LED/leda.mcs"
    INFO:iMPACT - Current time: 2014/3/13 8:49:32
    // *** BATCH CMD : Program -p 1 -dataWidth 16 -rs1 NONE -rs0 NONE -bpionly -e -v -loadfpga
    PROGRESS_START - Starting Operation.
    Maximum TCK operating frequency for this device chain: 66000000.
    Validating chain...
    Boundary-scan chain validated successfully.
    INFO:iMPACT - 1: Over-temperature condition detected! [ 230.52C >  120.00C]
    1: Device Temperature: Current Reading:  230.52 C, Max. Reading:  230.52 C
    1: VCCINT Supply: Current Reading:   2.997 V, Max. Reading:   2.997 V
    1: VCCAUX Supply: Current Reading:   2.997 V, Max. Reading:   2.997 V
    '1': BPI access core not detected. BPI access core will be downloaded to the device to enable operations.
    INFO:iMPACT - Downloading core file D:/Xilinx/14.3/ISE_DS/ISE/virtex6/data/xc6vlx240t_jbpi.cor.
    '1': Downloading core...
     Match_cycle = NoWait.
    Match cycle: NoWait
     LCK_cycle = NoWait.
    LCK cycle: NoWait
    done.
    INFO:iMPACT:2219 - Status register values:
    INFO:iMPACT - 0011 1111 0111 1110 0100 1011 1100 0000
    INFO:iMPACT:2492 - '1': Completed downloading core to device.
    Current cable speed is set to 6.000 Mhz.
    Cable speed is default to 3Mhz or lower for BPI operations.
    Current cable speed is set to 3.000 Mhz.
    Setting Flash Control Pins ...
    Setting Configuration Register ...
    Populating BPI common flash interface ...
    Common Flash Interface Information Query completed successfully.
    INFO:iMPACT - Common Flash Interface Information from Device:
    INFO:iMPACT - Verification string:  51 52 59
    INFO:iMPACT - Manufacturer ID:         49
    INFO:iMPACT - Vendor ID:              01
    INFO:iMPACT - Device Code:            18
    Setting Flash Control Pins ...
    Using x16 mode ...
    Setting Flash Control Pins ...
    Setting Configuration Register ...
    '1': Erasing device...
    '1': Start address = 0x00000000, End address = 0x008CE03B.
    done.
    '1': Erasure completed successfully.
    Setting Flash Control Pins ...
    Using x16 mode ...
    Setting Flash Control Pins ...
    Setting Configuration Register ...
    INFO:iMPACT - Using Word Programming.
    '1': Programming Flash.
    done.
    Setting Flash Control Pins ...
    '1': Flash Programming completed successfully.
    Using x16 mode ...
    Setting Flash Control Pins ...
    Setting Configuration Register ...
    '1': Reading device contents...
    done.
    '1': Verification completed.
    Setting Flash Control Pins ...
    Current cable speed is resumed to 6.000 Mhz.
    '1': Configuration data download to FPGA was not successful. DONE did not go high, please check your configuration setup and mode settings.
    `Elapsed time =    814 sec.
    and i find many people have met the same thing. But they are spartan  series FPGA and i try to low the Resistances of Mode pins,M0 M1 and M2, but the problem does not been solved.
    I have read the status Registers and find there is an over-temperature state 
    and in Impact i could not readback the registers. It is strange.
    I am anxious about this problem and have not solved it yet
    What reasons may it be?
    Hope for your answer, thank you

    Hi~I want to know if you solve the configuration problem for virtex-6?
    As I encounter the  same configuration problem, I want to consult  you with some question.
    Can I have your email?
    gszakacs wrote:
    I have measured the VCCINT and find it is 1.0V, not 2.997V;
    That is not at all surprising.  I always assumed the problem is with reading the XADC (system monitor) block and not with the voltage or temperature.
    my Reference board is ML605
    That would have been nice to know at the beginning...
    It seems that you have selected the correct mode, assuming your jumpers are set as required in the ML605 Hardware User's Guide.  See table 1-27, table 1-33 and the note below it about switch S1.
    I'm not that familiar with the details of this reference design, but it may be that the slave SelectMap circuitry requires a reset or power cycle to actually configure the FPGA.  Have you tried power-cycling to see if the FPGA boots from the flash?
    I'd also suggest that you select the V6 in the JTAG chain view, then go to the debug menu of Impact and select Read Device Status (this is from memory, but it's something like that).  That will not only show the bits of the configuration status register, but also describe what each bit means.  Among other things you can check the state of the FPGA's configuration logic and the Mode pins.
     

  • Reg.   Mean & Median in Graphs

    hi
    I need some help in the mean & median computation for the chart report ,
    i am building a one chart report , in that i am able to fetch the mean & median values for a person
    now my chart is line chart for this my co-ordinates are person name in X-Axis, mean & median are in Y-Axis,when i am filtered based on person name
    it will give the one point ( with the square symbol) on the chart ,
    instead of this point i want a straight line with respect to that value and parallel to the X-Axis
    if possible please let me know
    Thanks in advance
    babu

    Hi,
    As you are selecting person name on x-axis,each point on x-axis corresponds to each person.Now that you are filtering based on person name which results in only 1 person thereby resulting in 1 point.......so if you want a line
    here,you either need to change x-axis dimension (person name) or keep a more general filter such as group(which can include multiple persons or so...)hope this helps
    Regards

  • What does this error message when I try to do updates mean? And how can I fix it? Thanks.   The operation couldn't be completed. (NSURLErrorDomain error -1012.)

    What does this error message when I try to do updates mean? And how can I fix it? Thanks.   (The operation couldn’t be completed. (NSURLErrorDomain error -1012.)
    James
    maverick 10.9.1

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you boot, and again when you log in.
    Note: If FileVault is enabled, or if a firmware password is set, or if the boot volume is a Fusion Drive or a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to boot and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal boot may also be somewhat slow.
    The login screen appears even if you usually login automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, reboot as usual (not in safe mode) and verify that you still have the problem. Post the results of the test.

Maybe you are looking for

  • Songs end prematurely, skip to next track in iTunes 10.6.3

    I wanted to see if other iTunes users are having this issue. I'm using iTunes 10.6.3 (the latest version), and both my wife and I are seeing the same behavior in our iTunes libraries with songs we've either purchased from the iTunes Store or that we'

  • PR qty in PO - Order unit Qty

    Hi Happy New Year to all. I have a material for which bas unit of measure is EA. Order unit is Box(1 Box = 6 EA). I have maintain conversion factor in mat master. My question is that if my PR qty is 6 or less than 6 then my order qty should be 1 BOX.

  • Error in Transfer of Prod Ord to ECC

    Hi Experts, Hope you can help me with this issue. The converted planned orders in APO are not transferred to ECC due to this error "Backward Scheduling (enter finish date)". Seen this error in the logs. Really appreciate your help. SIncerely, Ria

  • Upgrading my Yoga 2 Pro to Windows 8.1 Pro?

    Anyone done this? There's no way I'm going to pay the £100 it asks for if I buy a new key on the machine, but I seem to be struggling to find a key that it likes. I've got paid-for retail Windows 8.0 Pro key that it doesn't like and also a "retail" 8

  • INSTALL [for install] error

    Hi, I am currently writing my own cap uploader, but am currently getting in the INSTALL command. My current steps are: Authenticate Secure Channel // reply 90 00 80 E6 02 - Install for Load command // reply 90 00 80 E8 - Upload data block // all give