Results 1 to 2 of 2

Thread: query questions

  1. #1
    Join Date
    Nov 2003

    Unanswered: query questions

    I am having a complete brainfart today - I have done this before but can't seem to remember how. I have the following data set:

    Inv_ID Customer Inv_Amt Inv_Date Inv_usr
    1 100 150 9/1/06 user1
    2 100 125 8/1/06 user2
    3 100 135 7/1/06 user2

    What I need to do is select the inv amt for each customer for the Max(inv_date) entered by user2. I nkow this is simple, but I can't seem to get it today.

    Thanks for any help!

  2. #2
    Join Date
    Jun 2004
    Liverpool, NY USA
    select inv_amt
    from my_table
    where inv_usr = 'user2'
    and inv_date = (select max(inv_date)
    from my_table
    where inv_usr='user2');
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts