Need Sql querry for this logic

Empname MJ sex desg salary managerid dept ID
2 B 2 JANUARY 12 M 10 20000 B1 SS
3 C 2 JANUARY 12 M 90000 10 C1 SS
4 D JANUARY 2, 12 M 15000 20 D1 SS
5 E 2 JANUARY 12 F 20 14245 E1 SS
6 JANUARY 2 F 12 F 2458 20 F1 SS
7 G 2 JANUARY 12 F 4556 20 G1 SS
8 JANUARY 2: 12 F SS 20 789 H1

Write an sql to get the name of the employee who received the highest wages? It is the question of the interview...
select empname
from employees
where salary in (select max(salary)
from employees);

Tags: Database

Similar Questions

  • I have adobe certified m graphic deisgner... I can my own video tutorials to teach others about photoshop and download it into my own Web site? I m phhotographer also... should I I need legal permission for this gentleman...

    I have adobe certified m graphic deisgner... I can my own video tutorials to teach others about photoshop and download it into my own Web site?

    I m phhotographer also... should I I need legal permission for this gentleman...

    You probably want confirmation from an Adobe employee and I do not work for the company, but its completely legal to post images and videos done with and on Photoshop that you use a legal version of the software. Of course if you copy videos from someone else so they can possibly file a lawsuit against you for plagiarism or copyright violation, but I suspect that your not likely to do

    Terri

  • Hi Mr President, last week I have a crash on my computer. Yesterday I installed PSE12... but I can't open the program, please I need help/support for this. Thanks a lot for helping me, Roland

    Hi Mr President, last week I have a crash on my computer. Yesterday I installed PSE12... but I can't open the program, please I need help/support for this.

    Wath can I do?

    In the box: PN 65224809, product key 1057 -.

    Please can you tell me wath is you solution?

    Thanks a lot for helping me

    Best regards, Roland Cuypers

    [email protected]

    Post edited by: Sandeep Singh removing serial number

    Hi rolandc65772962,

    Sorry for the inconvenience. Please provide us with the complete error message you get.

    Kind regards

    Sandeep

  • Aspire laptop DVD player GONE! SlimType DVD A D58A4SH need a fix for this DVD player

    Is there a fix out there for a problem loading the driver for CD/DVD Acer Aspire of the laptop drive?  I have the Aspire 5334 with DVD Super Multi DL drive.

    I have a Slimtype DVD A D58A4SH player. He worked for a short time when I got the notebook and then it stopped completely.  There was an exclamation point on the list of devices and when I checked to see if the pilot that it has been updated, he said it was the last updated, etc.  BUT still does not.  I tried to roll back - which did not work.  So I uninstalled the drive completely.  Did a restart and it recognizes the DVD drive and started to install the driver for it.  Says the driver installation failed.  The dvd player is no longer listed in Device Manager.  I tried to go to the download page of support/driver from the Acer website for this brand and the computer model - it does not list DVD drivers at all.   So now I'm confused.  It was a Christmas gift from 2011. So I think that the warranty has expired.  So I'm pretty ticked if I need to replace a failed drive which is just came out barely a month outside the warranty of the year.  Someone out there who has a fix for this problem it will be greatly appreciated.  Thank you.

    I found a FIX for this problem!  Yay!

    I had an error Code 39 and did a search on the Microsoft Web site.  Here is the link.  I followed the "method 2" and it worked Finally, got my rear DVD player. Phew!

    I hope this helps others with the same problems:

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_xp-hardware/DVDCD-ROM-drive-code-39/a79de01...

  • How to build a SQL for this logic.

    Hello

    I have a requirement like, I need to derive a column with a calculation.

    Here is the psedocode,

    number of occurrence (deptno = 10) / count (deptno = 10)

    Expected result:

    If the deptno = 10 occurs 3 times in the table, then at the time of fist should be the calcuation

    second 1/3, 2/3 of the time, the third time 3/3 and so on.

    How can I build in a sql query. Help, please.

    Any help will be appreciated with points.

    Thank you.

    Try this.

        SELECT LEVEL / CNT CALC
          FROM (SELECT COUNT (*) CNT
                  FROM EMP
                 WHERE DEPTNO = 10)
    CONNECT BY LEVEL <= CNT
    

    G.

  • How can I write the SQL query for this requirement?

    Hello

    I have a table that looks like this:

    NAME | ANNUAL |     VALUE
    ==== | ====== | =====
    execno |     480.     000004
    step |      480.     0400
    SCNA |     480. cd_demo
    System |     480.     D47-010
    type |     480.     step
    free_text |     480.     stage 400
    rbare |     480.     RBA-1
    execno |     482. 000004
    SCNA |     482. cd_demo
    System |     482.     D47-010
    free_text |     482.     step 300
    step |          482.          0300
    type |      482.     step
    rbare |     482.     RBA-1
    execno |     483.     000001
    type |     483.     step
    rbare |     483.     rke1
    SCNA |     483.     rke10
    step |     483.     0240

    Now, say that I want to fetch ONLY annual with execno = '000004' and '400' = step and scna = "cd_demo" and system = "d47-010' and type = 'step', how to write SQL code?
    At first, it seemed like a simple writing query but I've been struggling with it for hours without success. I must admit though that I'm not strong in SQL :-)
    There, can anyone help? Please...

    Thanks in advance.

    Emmanuel

    Published by: user12138559 on October 30, 2009 03:05

    Hi, Emmanuel.

    Welcome to the forum!

    Here's a way to do what you asked:

    SELECT       doc_id
    FROM       table_x
    GROUP BY  doc_id
    HAVING       SUM (CASE WHEN name = 'execno' AND value = '000004'  THEN 1 END) > 0
    AND       SUM (CASE WHEN name = 'step'   AND value = '400'     THEN 1 END) > 0
    AND       SUM (CASE WHEN name = 'scna'   AND value = 'cd_demo' THEN 1 END) > 0
    AND       SUM (CASE WHEN name = 'system' AND value = 'd47-010' THEN 1 END) > 0
    AND       SUM (CASE WHEN name = 'type'   AND value = 'step'    THEN 1 END) > 0
    ;
    

    If you think that a WHERE clause would be used, but WHERE does apply to a single line. You need a condition that checks several rows in the same group.
    WHEN has an effect something like WHERE.

    Published by: Frank Kulash, October 30, 2009 06:26

    This solution assumes that (name, annual) is unique.

  • Satellite S2410-504: need to screen for this device

    Hello
    I am trying to find a screen for the following
    Satellite S2410-504, PS241E-5G7U9-FR part number

    I have spent hours searching on google and ebay and so far have failed to find one. I don't yet know what type of connection, I need so I could try a different screen in there.

    Basically the screen on my laptop is dead and sometimes turns very very weakly in a dark brown color but above all does not. I was told it's light... ?

    Also to research here, it seems that this model is an edition 'special' toshiba made that did not help matters.

    (1) do I get a new full screen to solve?

    (2) where can I get a screen of?

    Hello

    Who knows what the problem could be show itself or even FL inverter?

    In my opinion you shouldn't hide it only if you have no experience. The part can be ordered by the partner in your country or check if some laptop parts offering can order one for you.

    I found out that display for Satellite 2410 serial number P000347380 but please check again before ordering one.

    Good bye

  • HP Compaq 6000 PRO SFF: Need some drivers for this desktop computer

    Hello, I have a model # HP Compaq Desktop 6000 PRO SFF and I need drivers for it the following:

    PCI serial port

    PCI Simple Communications controller

    Trusted Platform Module 1.2

    Someone please help... Thank you

    You are the very welcome.

    You need this driver.  Install manually if auto installation does not work.

    This package contains the Intel Local Management Service (LMS) and the support of Serial - over - LAN (SOL) for Intel Active Management Technology (AMT) for the supported desktop models and operating systems. This software is part of the Intel Digital Office Initiative.

    FTP://FTP.HP.com/pub/SoftPaq/sp45001-45500/sp45367 .exe

  • I need to allow the data controllers audio multi media that I need to find out how to access services running on your computer, I need to allow for this program and also Windows media center point final

    I need to allow the data controllers audio multi media that I need to know how to get to ser

    I need services running on your computer allow this program and also Windows media center point final. OK here is the problem have no sound on my computer, it says drivers are not installed, it indicates one or more programs need to be activated. It is said window media center end point should be activated. It is said he can not activate because no driver I have download the drivers yesterday and he always says the same thing, I have problems in trying to solve this problem, but don't know how I need help ok it tells me that there is no driver for my multimedia audio controllers. I have download then and he says the same thing, he repeats to me also to activate the multimedia audio controllers, I need to know how to get to the program that has all the services of the computer, so I can allow these things that need to be activated I do not know how attend you this program thank you for your help.

    The following articles can help me.

    http://www.ehow.com/how_6533261_install-multimedia-audio-controller.html

    http://www.TomsHardware.com/Forum/57964-3-enable-multimedia-audio-controller

  • What can be the SQL query for this requirement?

    Hello
    I have a table with the fields like this:

    ID DESC PARENT
    01 02 ABC
    02 01 ABC1
    03 01 ABC2
    04 02 ABC4


    In the table above column PARENT refers to the column ID, but actually in the SQL query, I want to have ID DESC and PARENTDESC (i.e., desc ID value corresponding)

    Output real I need is

    SELECT ID, DESC? from table where ID = someValue. Now, if I provided ID = 01 then output should be like this:

    ID DESC PARDESC
    ABC1 ABC 01


    Can anyone help on what may be the required sql query?

    Published by: bootstrap on April 29, 2011 06:15

    SELECT T1.ID, T1. DESC, T2. / / DESC
    FROM TABLEA T1, T2 TABLEA
    WHERE T1.ID = '01'
    AND T2.ID = T1. PARENT;

  • I have a model of monitor HP F1904 DO I NEED a DRIVER for THIS?

    I am about to buy a new HP Envy 17-j003sa TouchSmart laptop and want to use the HP F19O4 monitor as a second screen that I need to down load a driver for it. are these two Roodie compatableThanks

    HP f1904 monitor has a maximum resolution of 1280 x 1024 and only DVI and VGA inputs. HP ENVY 17 - j003sa Notebook computer has a resolution of 1920 x 1080 and appears to only have a HDMI output. It may be possible to connect the two using a HDMI-DVI cable. It doesn't seem to be available 7/8 Windows drivers on the HP Pavilion f1904 19 inch LCD monitor drivers & downloads page and should not need a driver.

    The monitor is lower compared to the computer. I would suggest buying a new monitor 1920 x 1080 to compliment the 17-j003sa of HP computer that you intend to buy.

    Please click the White Star of KUDOS to show your appreciation

  • How to build a formula for this logic.

    Hello

    I have a requirement like, I need to derive a column with a calculation.

    Here is the psedocode,

    number of occurrence (deptno = 10) / count (deptno = 10)

    Expected result:

    If the deptno = 10 occurs 3 times in the table, then at the time of fist should be the calcuation

    second 1/3, 2/3 of the time, the third time 3/3 and so on.

    How can I build this in a form/report/RPD design. Help, please.

    Any help will be appreciated with points.

    Thank you.

    The overall operation will help you do this, i.e. RCOMPTE, C.V.

    This should work:

    C.V. (CASE WHEN deptno = 10 THEN 1 ELSE END 0)

    to give you the current account lines where deptno = 10

    Then you can divide ths by

    SUM (CASE WHEN deptno = 10 THEN 1 ELSE END 0)

    don't know if that will be 100% or not, but try the first statement so you can see the overall work running, then try the Division in order to see if it works:

    C.V. (CASE WHEN deptno = 10 THEN 1 ELSE END 0) / SUM (CASE WHEN deptno = 10 THEN 1 ELSE END 0)

  • I get a window asking me to upgrade to firefox 4.0 but my system on my MAC G5 does not allow this upgrade, I can't close this window without qitting firefox, then restarting. I need a fix for this... Thank you... Trevor Harvey

    My system is Mac OS X version 10.4.11 is not compatible firefox 4 even if I get this window asking me to upgrade

    Go to tools | Options | Advanced and in the update tab, clear the High option of the page to check the updates of Firefox. See Update tab

  • Have a PC desktop, Compaq Presario 5WV270 without an operating system. I need XP Pro for this device.

    Running the software of HAM that requires WIN XP Pro SP3 32.  My understanding of several years that these units need their own flavor of Microsoft operating systems.  Where can I find a decent XP Pro?

    K1ger, welcome to the forum.

    Here is the product to the computer specification page:

    http://support.HP.com/us-en/document/c00009542

    The original operating system was Windows Millennium.  Windows XP requires a minimum of 1 GB of memory to operate properly.  The motherboard supports a maximum of 768 MB memory.  Therefore, I do not recommend installing XP.  A new computer may be your best option.

    If your problem is solved, please click "accept as a Solution.

  • do I need different cooler for this processor

    I7-2670QM

    Dell Xps L502x

    aware of the CPU: i5 - 2410 m

    card mother Version: A00

    card mother name: 0YR8NN

    map parent serial number: ADMIN NOTE: maintain the label removed by privacy policy >

    If so can I please have the part No.

    I also have adapter 130w

    There is that only one radiator-fan - nothing else will fit.  Make sure that you apply a new thermal pad or radiator composed when you mount the CPU.

Maybe you are looking for

  • Refurbished or new iPhone 6s?

    I pre-ordered the 6 s Apple iPhone (silver, 64 GB) as soon as it was available for pre-order in the Netherlands, early October 2015. In March 2016, the iPhone just turned off and showed no signs of life, he disappeared. It wasn't because of the damag

  • Manual configuration of the proxy don't glue - don't stay - pass when the tabs.

    Suddenly, in the 27 new FF, when I manually set a proxy, it turns off (goes back to the 'No proxy') when I tabs or open a new tab. He used to stay up until I turned it off. I want him to stay through all the tabs up to what I turn it off, as he used

  • the images appear psychedelic on Netflix

    Can't watch movies on Netflix because it looks like psychedelic.  I've updated the graphics driver, adjust the screen resolution for the optimum setting for this netbook and adjusted the color settings.  In my non technical level of expertise, I'm do

  • Registration of ISE1.2 MAC after LDAP web-auth

    Faced with a situation where we just do a simple one time registration of the MAC address after a person authenticates successfully web-auth using LDAP. It is very similar to guest authentication, but I do not know how to customize the other portal f

  • Shortcut to switch between the samples during the live paint tool?

    Hey guys, so I noticed recently near the cursor when using paint direct bucket there is 3 pallets.(Sorry for the quality of the photo, did not know how for shooting with the cursor on the screen.)So 3 palettes are according to the swatch group as you