Get Only Highest Amount

I have a table "History" where all bids for a particular Item are recorded. Is there a way I could query this table to get only the highest Bidder?
Below is my query returns all records.
select Itm,Max(Amntbid)
From history
Group By Itm,Amntbid
order by Amntbid DESC
The above works by sorting starting with the Highest amount. But is there a way to get only one record with the highest amount?

Sorry, I should have added, it's unclear from your requirements if you are looking for highest bid per item or if you are just looking for the highest bid overall. If you are just looking for the highest bid over you can remove the PARTITION BY clause:
All items with highest bid:
select itm, amntbid from
     (select itm, amntbid, dense_rank() over (order by amntbid desc) rnk
          from history)
where rnk = 1;Selects only one item (even if there are multiple items) with highest bid:
select itm, amntbid from
     (select itm, amntbid, row_number() over (order by amntbid desc) rnk
          from history)
where rnk = 1;

Similar Messages

  • My client current process shift amount is prorating.   Now my client requirement  employee change shift (SE20321D)   to normal (NSO70012) in the mid of the month employee will get shift  full amount,

    Hi Experts,
    Please help me to solve this two issues
    I will give you clearly about my client requirement
    in the current system (existing)  already configured  for shift allowance.
    shift allowance for executive
    Shift Allowance Rates
    2 shift
    3 shift
    RM  240
    RM 330
    shift allowance for non executive
    Shift Allowance Rates
    Category 1
    Category 2
    2 shift
    3 shift
    2 shift
    3 shift
    RM  180
    RM 280
    RM 95
    RM 130
    they are not maintained (there is no any key)   in info type 0014 or info type 0015  they earliest hr consultant  copied to  the Shift Allowance wage types :- 5533, 5534,5535,5536,5537,5538and 5559
    Note : 5533 & 5536 are for Payment.
    Other wage types are for calculation purposes only.
    And they modified (standard LAP9)  YAP9 (copied)  schema written pcr  for shift allowance
    The pcrs are YSH1,YSH2,YSH3,YSH4,YSH5,YSH6,YSH7,YSH8,AND YSHF
    1) So my actual my client requirement (Issue 1)
        In my client current process shift amount is prorating.   Now my client requirement  employee change shift (SE20321D)   to normal (NSO70012) in the mid of the month
    employee will get shift  full amount
    2) client requirement (Issue 2)     Shift Allowance become prorate if the Action (Info type 0000)  in the same month have changes. (Depand the action type)
    Actions are
    WA,WB,WC,WD,WE,WF,WG,WH,WI,WJ,WK,WL,WM,WN,WO,WP
    XO,X1,X2,X3,X4,X5,X6,X7,X8,X9.
    XA,XB,XC,XD,XE,XF,XG,XH,XI,XJ,XK,XL,XM,XN,XP,XQ,XR,XS,XT,XW,XX,XY,XZ.
    Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7
    YA,YB,YC,YD,YE,YF,YG,YH,YI,YJ,YK,YL,YM,YN,YP,YQ,YU,YV,YW,YX,YY,YZ
    Z9,ZY
    Example
    in same month employee changed action on 20.07.2014
    Kindly help me to solve this issues  feel very happy for your help.and if you need any information about issue please let me know i will share to you.
    Thank you
    Raamarao

    Try this, it works very well for me.
    import XMonad.Hooks.ManageHelpers (composeOne, isFullscreen, isDialog, doFullFloat, doCenterFloat)
    myManageHook = composeAll. concat $
    [ [ className =? c --> doCenterFloat| c <- floats]
    , [ resource =? r --> doIgnore | r <- ignore]
    , [ resource =? "gecko" --> doF (W.shift "net") ]
    , [ isFullscreen --> doFullFloat]
    , [ isDialog --> doCenterFloat]]
    where floats = ["sdlpal", "MPlayer", "Gimp", "qemu-system-x86_64", "Gnome-typing-monitor", "Vlc", "Dia", "DDMS", "Audacious", "Wine"]
    ignore = []
    myLayout = tall ||| Mirror tall||| Full ||| tab ||| float
    where
    tall = named "Tall" $ limitWindows 4 $ minimize $ Tall 1 (3/100) (1/2)
    tab = named "Tab" simpleTabbedBottom
    float = named "Float" simpleFloat
    main = do
    myStatusBarPipe <- spawnPipe myBar
    conkyBarProc <- spawnPipe conkyBar
    trayproc <- spawnPipe myTrayer
    xmonad $ ewmh $ withUrgencyHook NoUrgencyHook $ defaultConfig {
    terminal = "urxvt"
    , manageHook = manageDocks <+> myManageHook <+> manageHook defaultConfig
    Last edited by helloworld1 (2012-08-14 05:20:56)

  • How to get the highest grade?

    Hello! How u get the highest occurence grade? lets say if Mr A score 85 for his test, u get an 'A'. Mr 'B' score 95, he also get an 'A'. And lastly, Mr C score '25' which is 'F'. So i have to get out 'A' as it is the highest occurence grade. But no matter what I try, I just can't get it right. Hopefully, someone here can help..

    Hopefully he will come back.
    You folks who answered him performed a dis-service.
    Its not up to you to decide "how" a person is to
    learn java, just answer the question, instead the kid
    got a dressing down.
    If you answer his question, there are only 2 outcomes
    possible:
    1.he will make an effort to understand the code, he
    will learn.
    2.he will simply copy the code, not learn & will fail
    his mid-term
    He should be treated like an adult, he knows the
    consequences if he doesnt make the attempt to
    undertand the answer... he will fail his course. Kid,
    post your email address... i will give you as much
    help as i can, its up to you what u do with it. k? I
    would like to help u. hi and very sorrrrrrrrrrrrrrrrrrrrrrrrrrrrrry for bieng rude but the thing was that the prob was very easy and seemed to be of the type of a homework ...... on the other hand i should be appreciated atleast i gave the idea of a solution . and i persnally dont think that anymore spoonfeeding should be done to a person learning java
    moreover that person should learn to think big coz its all a game of big ideas

  • Highest amount among children in a BW hierarchy

    Hi All
    I have a Webi report directly using a BeX query with 0COSTCENTRE hierarchy. My report only displays information about Level 3 cost centers but I want to show the highest [Amount] among Level 4 children of that particular Level 3 cost center.
    Can anybody please let me know whether this is possible. If so, can you please share instructions on how to do this.
    Regards
    Umesh

    Was able to figure this out myself.
    Max([measure];[0COSTCENTRE].Children)
    Furthermore I was able to show the Level 4 Cost center text and amount along side level 3 parent cost center.
    It was bit of a lengthy path; Hope somebody can improve it. Steps are as follows....
    MaxChildAmount = Max([Amount];[0COSTCENTRE].Children)
    MaxParentAmount = Max([MaxChildAmount ];[0COSTCENTRE].Parent)
    CostCentreName = If([Amount]=[MaxParentAmount ];[0COSTCENTRE.text])
    MaxChildName = Max([CostCentreName ];[0COSTCENTRE].Children)
    Now you can use MaxChildName in the same row as Parent name
    Thanks all

  • I'm getting message that amount withdrawn successfully but it's not showing in my bank account

    I'm from India and due to some restrictions paypal amount automatically withdraw to the bank account. I'm getting message that amount is successfully withdrawn but it's not showing in my bank account how many days it will take to appear in bank account?

    How do I now put it on another computer? I only have the license/reg number that is on the software. I'd appreciate whatever help anyone has to give!
    You can still  download the Aperture 3.1 Trial  installer to reinstall Aperture from this webpage - there is a link to the trial and instructions on how to reinstall - don't let the title of this page distract you :
    Aperture 3.4: May quit unexpectedly on launch after updating
    The Aperture 3 serial number will be available in the about panel, when you are running Aperture on your old mac (from the main menu bar: Aperture > About Aperture).
    Regards
    Léonie

  • I get double the amount od gmail notifications in notification -- both from new mail and all mail.  What can I do?

    I get double the amount of gmail notifications on my iPhone 4 or iPad 2 using iOS 5.  Any ideas how to fix?

    I Think that you have system sounds muted.
    System sounds can be muted and controlled two different ways. The screen lock rotation can be controlled in the same manner as well.
    Settings>General>Use Side Switch to: Mute System sounds. If this option is selected, the switch on the side of the iPad above the volume rocker will mute system sounds.
    If you choose Lock Screen Rotation, then the switch locks the screen. If the screen is locked, you will see a lock icon in the upper right corner next to the battery indicator gauge.
    If you have the side switch set to lock screen rotation then the system sound control is in the control center if you are running iOS 7. Swipe up from the bottom of the screen to get to control center . Tap on the bell icon and system sounds will return.
    If you have the side switch set to mute system sounds, then the screen lock can be accessed in the same manner as described above.
    This support article from Apple explains how the side switch works.
    http://support.apple.com/kb/HT4085

  • Can not open iCloud on MBP? Want to PhotoShare. Set up in iPhone.   Go to System Preferences, click on iCloud, get the message "move to iCloud", sign in, click on open iCloud", sign in again, and get only FindmyPhone?

    Set up in iPhone.   Go to System Preferences, click on iCloud, get the message "move to iCloud", sign in, click on open iCloud", sign in again, and get only FindmyPhone? Thus, when I go to Iphoto to set up photo sharing, it says I have to have icloud account-go to sys preferences--then i go through the loop again?  Suggestions?

    jgtown wrote:
    Now I have to get my sign-in for mobileme to be the same as my sign-in for Itunes, etc. so I have only one Apple ID!
    You're not going to be able to: you can't merge accounts or transfer iTunes purchases from one Apple ID to another: but there is no problem about using two IDs.
    Use your ex-MobileMe email address (which is also an Apple ID) for iCloud for syncing email, contacts, calendars, bookmarks, and PhotoStream.
    Use your other Apple ID as before for iTunes, iTunes in the Cloud and iTunes Match.
    There's no conflict about doing this, and you won't even notice as Keychain will log you in with the correct ID in each case. It's also better security not to have your iTunes login also your email address, given the number of complaints about hacked iTunes accounts.

  • Family shares an itunes account and ALL songs loaded on my phone with ios 7. how do I get only my songs?

    My family shares an itunes account and ALL their songs loaded on my phone with ios 7 upgrade. Previously, while I could SEE songs "Not on this iPhone" they did not reside on my phone.  How do I get only my songs?  Do I have to sync with my computer?  Help...

    This is sad, as I am replying to myself. Upon further review I see that while all songs are LISTED, that are not actually there.  By going to Settings - iTunes & App Store - "Show All" I was able to "turn off" SEEING purchases not made on my phone.  Solved my own problem, but the way it looks in IOS 7 is confusing.

  • How can I get only the music I want onto my iPhone using iTunes Match

    how can I get only the music I want onto my iPhone using iTunes Match?  At present it is putting a random selection on; it has none of the same control as iTunes on my Mac.  And although I uploaded all my album artwork to iCloud, it is not transferring it back to my iPhone

    Iphone are meant to be sync to one itunes library only.
    You can copy those songs to a cd and then put a copy to your itunes media library.

  • In Table Control How to get only a single row .

    Hi
    In Table Control How to get only a single row .I am able to decrease it its height to 4 but then 2 rows is getting dsplayed .I want only one row to be display and 2nd row should be deactivated or not visible.
    regards
    Avik
    Edited by: Julius Bussche on Jan 30, 2009 1:10 PM
    Removed friendly greeting from the subject title

    Hi Avik
    use this code it will help you.
    MODULE passdata OUTPUT.
      READ TABLE it_revision INTO wa_rev INDEX tab_clc-current_line.
      IF sy-subrc = 0.
        LOOP AT SCREEN.
          IF screen-group1 = '111'.      " 111 IS THE GROUP NAME
            screen-input = 1.          " input mode
            screen-active = 1.         " input mode.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSE.
        LOOP AT SCREEN.
          IF screen-group1 = '111'.       "GROUP NAME
            screen-input = 0.           " display mode
            screen-active = 1.          " DISPLAY MODE.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDMODULE.                 " PASSDATA  OUTPUT
    Make sure in group tou are passing the field name that you want in input mode on the base of other field
    Hope it will help you.
    Thanks
    Arun Kayal.

  • How can I get only the last 2 rows?

    How can I narrow down a query to get only the last two rows in a table ?
    Thanks,
    Mohan

    Thanks a lot Ram for your suggestion but already I have a query which returns a set of rows, of which I would like to further filter and get the last two rows
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Ramanuj Bangad ([email protected]):
    try out something like this if it helps.
    Example:
    select * from users
    where rownum <= (select count(*) from users)
    minus
    select * from users
    where rownum <= (select count(*) -2 from users )
    <HR></BLOCKQUOTE>
    null

  • I have Office 2011 which includes Word.  Ever since downloading Mavericks, when I try to send a two-page word document, some recipients get only one page.  Also sometimes when I burn an image from iPhoto on to a disc, only part of the image appears.  Why?

    I have Office 2011 which includes Word.  Ever since downloading Mavericks, when I try to send a two-page Word document by email, some recipients get only one page.  Also when burning an image from iPhoto (usually no larger than 1mb) on to a disc, only part of it appears.  It appears to have been magnified so that only a part of the image appears.  Can anyone enlighten me as to what is happening?  And how to fix it??

    I have Office 2011 which includes Word.  Ever since downloading Mavericks, when I try to send a two-page Word document by email, some recipients get only one page.  Also when burning an image from iPhoto (usually no larger than 1mb) on to a disc, only part of it appears.  It appears to have been magnified so that only a part of the image appears.  Can anyone enlighten me as to what is happening?  And how to fix it??

  • How to get only column names from different tables as single table columns

    Hi All,
       I have one requirement in which we want only column names from different tables.
    for example :
     I have three tables T1 ,T2, T3 having
      col1 clo2 clo3 -->  T1 , 
      col3 col5 ,clo6 --> T2 ,
      Clo6 col8 col9 --> T3
    columns i want to get only all  Column names from all table as single Resultset not any data from that how can i get that empty resultset 
    because this empty result i want to bind in datagridview(front end) as Empty resultset 
    Please tell me anyways to do this
    Niraj Sevalkar

    If I understand you want an empty result set, just with metadata. SET FMTONLY do the trick:
    SET FMTONLY ON
    SELECT Col1, Col2, Col3, ....., Coln
    FROM
    T1 CROSS JOIN T2 CROSS JOIN T3
    SET FMTONLY OFF
    Another alternative is to include an imposible contition
    SELECT Col1, Col2, Col3, ....., Coln
    FROM
    T1 CROSS JOIN T2 CROSS JOIN T3
    WHERE 1 = 0
    If you are using a SqlDataAdapter in your client application. You can use the FillSchema method. the select command may be any select statement that returns the columns you want. Under the covers FillSchema will call SET FMTONLY ON.
    If you are using SqlCommand.ExecuteReader you can pass SchemaOnly to CommandBehavior argument. SET FMTONLY ON is called under the covers. Again the select command may be any select statement that returns the columns you want.
    "No darás tropezón ni desatino que no te haga adelantar camino" Bernardo Balbuena

  • I am able to get color images in the continues shot but when i try to snap a color image which i need for my processing i get only a monocrome image

    I have been using lv_vfw.llb VI's for grabbing images from a CREATIVE WEB CAM ,i am able to get color images in the continues shot but when i try to snap a color image which i need for my processing i get only a monocrome image ,i have been trying to play around with the RGB weightings but i am unable to get a color iamge,it shall be of great help if you could help me in doing this as it is urgent for me.Thanks for your help.

    vicky,
    I am unfamiliar with the lv_vfw.llb, and have not used it before. However, I noticed that you stated that you are able to grab in color, just not snap in color. If this is the case, why not just perform a grab and then extract a single buffer from this grabbed data, which would likely be in color? This seems like a possible solution to the issue that you are seeing.
    Other than that, I really don't know enough about the lv_vfw.llb to be of much help on this issue. Hopefully another member of this forum will be able to assist you with this software.
    Regards,
    Jed R.
    Applications Engineer
    National Instruments

  • Getting only a few records at a time.

    Using a Select * from. Is there an option where I get only so many records. This is for a console application. I wanted some thing where it will display only 3 records at a time. And then I have the option of viewing the next 3 and then the next 3 records
    and so on.
    Any one have any ideas.
    Merry Christmas EVERY ONE and thanks to all the members on msdn forums for helping me with my code.
    Joe Moody
    http://www.starfiresoft.com
    Pro-Forums
    Delta Force Barracks
    On the Frontlines

    Thanks. It doesn't matter as long as I can get it to work. The idea is to display 3 records at a time. Then the user should be able to go backward or forward in the list. Let me show you what I have. This will give you some idea on how I have it displaying
    the info.
    SqlCeCommand cm = new SqlCeCommand("SELECT * FROM users", cn);
    //cm.Parameters.AddWithValue("@tooid", num);
    //cm.Parameters.AddWithValue("@fromid", Id);
    SqlCeDataReader rd = cm.ExecuteReader();
    try
    while (rd.Read())
    Door.CursorRight(10);
    Door.WriteLn("|0C___________________________________________________");
    Door.CursorRight(10);
    Door.WriteLn("|0FId |04: |03" + rd["Id"].ToString() + " |0FName |04: |03" + rd["username"].ToString());
    Door.CursorRight(10);
    Door.WriteLn("|0FStatus |04: |03" + rd["status"] + " |0FDate Jointed |04: |03" + rd["joindate"]);
    Door.CursorRight(10);
    Door.WriteLn("|0C___________________________________________________");
    catch (Exception e)
    throw new Exception(e.Message);
    cn.Close();
    This is inside of a do loop. and at the bottom I have it waiting for user input. or the user can quit and return to the main menu.
    Door.WriteLn();
    Door.Write("|07Page |0F<|04||0F> |0FQ|09)|0BQuit |07Choice |04: |0C");
    cc = Char.ToUpper(Door.ReadKey());
    Above is my prompt. This waits for user input. and I use a switch to tell the software what to do. Any way if you want to know what Door.writeLn() is, Think of it like this "Console.Writeline()". This is just a library I use for the kind of programming I
    do.Any help would be great. Thanks and have a safe Xmas.
    Joe.
    http://www.df-barracks.com Delta Force Barracks
    http://www.starfiresoft.com Starfire Software

Maybe you are looking for

  • Boot Camp x64 is unsupported on this model

    I am in a panic mode and I need assistance.  I have a mid-2007 iMac running Mountain Lion and I just attempted to install Windows 7 using Boot Camp.  The Windows 7 installation went fine but I am unable to install Boot Camp and am therefore unable to

  • I cannot derive a file name that will let me export my Keynote file as a PDF.  I understand the 31 character limit, but what other secret niceties must I observe?

    Hmmmm . . . . I used to be good at this, back in the day . . . OK:  I take a KN file and attempt to export as pdf for later upload to SlideShare servers, which can't take straight KN submissions anymore.  I keep my file names under 31 characters, as

  • ACC7.11 install

    hi guys, I have two questions here 1.What option should i have to choose in sapinst to install ACC7.11   SAP EHP1 for PI7.1   installation options -> Application server java with MS SQLserver -standard system is correct? pls confirm. 2.What are the s

  • Mpeg dvd playing problem

    I have just had some camcorder video tranferred to dvd by a professional company. When I try to play the dvd's my iMac doesn't recognise the dvd even exists. The presence of the dvd does.'t show up in Finder so I can't drag it in to such a program as

  • ITunes Not Responding with Vista 64-bit Running on Dell Studio 15

    Hi! I am running Vista 64-bit SP2 and downloaded the newest 64-bit version of iTunes. My music is located on an external network drive. Every time I open iTunes it starts to load the music and then just sits there and I have to kill it with the Task