Who has the  distinct TOP 5 Salary employees

i want out put like this from emp table
eno: ename sal
2 zzz 7000
3 www 6000
4 vvvvv 5000
5 fff 4 000
6 zzz 3000
it's very urgent

Hi,
You can try this:
SQL> SELECT * FROM EMP ORDER BY SAL DESC;
     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
      7369 SMITH      CLERK           7902 17-DEC-80       8000                    20
      7839 KING       PRESIDENT            17-NOV-81       5000                    10
      7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
      7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
      7566 JONES      MANAGER         7839 02-APR-81       2975                    20
      7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
      7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10
      7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
      7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
      7934 MILLER     CLERK           7782 23-JAN-82       1300                    10
      7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
      7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
      7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
      7900 JAMES      CLERK           7698 03-DEC-81        950                    30
14 rows selected.
Wrote file afiedt.buf
  1  SELECT * FROM (
  2  SELECT empno,ename,sal,row_number() OVER (ORDER BY sal desc) rn FROM EMP
  3* ) WHERE rn <=5
SQL> /
     EMPNO ENAME             SAL         RN
      7369 SMITH            8000          1
      7839 KING             5000          2
      7788 SCOTT            3000          3
      7902 FORD             3000          4
      7566 JONES            2975          5
SQL> Regards
Message was edited by:
Avinash Tripathi

Similar Messages

  • How do I delete photo ALBUMS from my iPHONE 4? I sync via icloud and I can not see any folders selected in itunes. I searched the internet and basically there is no one who has the answer to how you delete the iphone photo library and misc albums

    how do I delete photo ALBUMS from my iPHONE 4?
    I sync via icloud and I can not see any folders selected in itunes.
    I searched the internet and basically there is no one who has the answer (so far)
    to how you delete the iphone photo library and misc albums
    I have also had every iphone and I am not stupid.
    charles altman

    Replying to my own post - heh. I downloaded iExplorer (http://www.macroplant.com/iexplorer/) which allowed me access to the files on the phone and there was the phantom movie in the DCIM folder. Deleted it, and all is well - although I still have 0.65gb of Other in iTunes.....

  • I can't get my ipod touch 2nd generation to sync with itunes, at the end of the sync the message ''the ipod cannot be synced, an unknown error occurred (13019)'' my sister who has the same ipod also has the same problem.

    my sister who has the same ipod also has the same problem, i ve tried re downloading itunes and restoring factory settings on my ipod but nothing works!

    Did you try all the suggestions mentioned here? iTunes Error 13019 during sync

  • How can I find out the list of users who has the access to IT 0008

    All,
    How can I find out the list of users who has the W R permission for IT 008
    for others?
    SUIM doe not look like giving me the correct results.
    Please advise.
    Thanks,
    From
    PT.

    combine tables AGR_1251 and table AGR_Users on keyfield AGR_USERS
    in tabel AGR_1251 select on Field LOW values IT0008.OR W OR R,
    noiw you get also other values
    So better solution run the query twice over AGR1251 first on IT0008 and secondly on values W OR R and then the result over table AGR_USERS
    Youu also might put an additional selection on object P* (only selecting HR objects)
    output wll be UID in table AGR_USERS

  • Currently running Adobe XI Standard, i have a PDF that i Save As excel however on my computer it converts it differently than my coworkers computer who has the same Adobe version and same version of Excel 2010. Is something different selected on mine than

    Currently running Adobe XI Standard, i have a PDF that i Save As excel however on my computer it converts it differently than my coworkers computer who has the same Adobe version and same version of Excel 2010. Is something different selected on mine than his? How can i troubleshoot?
    Can provide more information if needed...

    Hello nmohamm,
    To examine the conversion settings in Acrobat, do the following:
    1. Select Edit > Preferences
    2. In the preferences dialog, select the "Convert From PDF" category.
    3. In the "Converting From PDF" list, select "Excel workbook".
    4. Click the "Edit Settings" button to view your conversion settings.
    Regards,
    Charlene

  • Anyone who has the src of JavaTM Look and Feel Design (second edition)?

    Anyone who has the src of JavaTM Look and Feel Design (second edition)? It would be really appreciated to let me know.
    Thanks -

    My bad, my post was unclear.
    I wasn't sure what you meant by src. You clarified that point.
    By (re)reading parts of the online text book, I realized that it's quite outdated. They really should issue a more up-to-date version.

  • HT201272 wait just to be sure i am not the only one who has the "term and conditions" problem

    wait just to be sure i am not the only one who has the "term and conditions" problem

    Go to Crucial.com and use one of their two methods to determine what upgrades are available for your Mac:
    I would purchase the modules from Crucial as they are very reliable and wiill work with you if you have problems.
    OT

  • Who has the labSQL can use in labview7.1?

    hi, who has the labSQL data package can use in labview 7.1? Thank you
    Solved!
    Go to Solution.

    Have you tried searching online? Here is the download, LabSQL.
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies

  • For the second time this week the sound on my iPad 2 doesn't work. Who has the solution for this problemen?

    For the second time this week i don't get any sound from my iPad 2. Who has the solution for this problem?

    Check your settings. The iPads have a small switch on the right edge. It can be used as a rotation lock to keep the screen from automatically reorienting itself as you move around, but you need to have the tablet’s settings configured properly. That same switch, right above the volume buttons, can also be set to function instead as a mute button to silence certain types of audio.
    If the switch is set to work as a mute button, you can change its purpose to “screen-rotation lock” by tapping the Settings icon on the home screen. On the Settings screen, tap General on the left side, and on the right side of the screen flick down to “Use Side Switch to.” Tap to select Lock Rotation or Mute to set the button’s function. Even if you set the side switch for your preferred use, you can still mute the Mini or lock the screen. Just double-click the Home button, and when the panel of apps appears along the bottom edge of the screen, flick the row from left to right with your finger. Tap the icon on the far left side of the row to either lock the iPad’s screen or mute the iPad’s alerts, notifications and sound effects. Music, podcasts and video are not muted unless you turn the volume all the way down.
    http://www.atreks.com/app-no-sound-on-ipad-4-%E2%80%93-what-to-do/
     Cheers, Tom

  • HT201272 Where has "who has the biggest brain" app gone?

    Does anyone know where the app "who has the biggest brain" has gone. I'm sure it was made from play fish?

    Ask the app maker.

  • Who has the following error message..please look it up...

    Hello !
    Who has the following error-message when connecting a ipod to the Cinema Display:
    Aug 6 12:29:01 G5 kernel[0]: /SourceCache/AppleFWOHCI/AppleFWOHCI-244.4.0/AppleFWOHCI.cpp 3435: ERROR: FireWire (OHCI) Apple ID 42 built-in: handleUnrecoverableErrorInt
    Please look in the console Application in the file system.log
    What does it mean ?
    Thanx

    It means that the firewire port in your Cinema Display has problems. Read more here: Thomas Berglund, "Problem with 20" Firewire..Who has the following entry ?" #2, 04:45am Aug 20, 2005 CDT

  • When calling someone in handsets mode,couldn't hear anything until I turn it into speaker mode. Who has the same fault?

    When calling someone in handsets mode,couldn't hear anything until I turn it into speaker mode. Who has the same fault?

    I searched the iPod Touch forum for "iphone in recovery mode" and it appears there are two possible solutions:
    - Place the iPod in DFU mode and then restore it> 
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - Use this program to get it out of recovery mode:
    RecBoot: Easy Way to Put iPhone into Recovery Mode | Jaxov

  • I need feedback from anybody who has the 2011 baseline 15" MacBook Pro

    I need anyone who has the new baseline 15" MacBook Pro to give me feedback. Like, is it fast enough, is the resolution ok, is the hard drive fast enough at 5400 rpm or is it slow in transferring data, especially this point, does it require any upgrade, and all that other stuff.

    Perform a SMC Reset, it could be causing your battery problems.
    https://support.apple.com/kb/HT3964

  • On my iPad, in iCal, whenever I attempt to go to March 2013 the application closes. I know of at least one other user who has the same problem. Has anyone else had the same experience

    I am using an iPad.
    In iCal, whenever I try to turn to the month of March, the app closes.
    I know of at least one other person who has had the same problem.
    Has anyone had a similar experience and know of any solution?

    Chiave2,
    Why does the month March 2013 not show...: Apple Support Communities, and Why can I NOT select March 2013 Month...: Apple Support Communities may provide you with a solution for your problem.

  • Who has the most pictures in iWeb AND stable?

    It seems the more pictures I add to my iWeb site, the less stable it gets.
    Who has a lot of pictures in iWeb? Is your site stable? Does iWeb load quickly? Does it lose pictutes?

    Bird,
    My 08 is almost impossible to run,,,it is so slow and my web sites take 15 minutes to load on friends computers. Will Apple give us a download for 06? They did for IMovie! I downloaded IMovie 6 today and got all my movies back!!! Why not IWeb as well?
    Jeff

Maybe you are looking for

  • Oracle 8i for Windows ME

    I am having trouble installing Oracle 8i (8.1.6) on WindowsME. I have downloaded the Personal version off of Oracle's website for Window's '98 assuming it would work, but I was wrong. I cannot get past the part where it asks me for a "source" and "de

  • Mass Loading of documents on Easy DMS

    Hi SAP DMS We need to load 17 000 documents on SAP Easy DMS, Is there a mass upload functionality that we can use and What is the maximum  number of documents can we drag and drop if the mass upload functionality is not available on Easy DMS? Thanks

  • Need to Increase mount point disk space

    Hello, I do not know whether this is the appropriate forum to post my question. I need to increase the mount /u01 disk space . I would like to club two mounts and make one File system to a make a bigger one. I do have 2 filesystems mounted on 2 disks

  • About this Mac- Storage anomaly in Lion

    Looks like the little utility in Lion is reporting incorrect numbers. Attached is a picture to spare me the 1k words.

  • My magic mouse won't scroll at all. Can anyone help?

    I have just updated to the Lion OS, now my magic mouse wont scroll. I am using a iMAC i5 27". John