sort data with max value and in group of addids
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: sort data with max value and in group of addids

  1. #1
    Join Date
    Mar 2010
    Posts
    6

    sort data with max value and in group of addids

    I have the following data with me

    AddId Salaries
    10 600
    10 50
    10 400
    10 300
    10 200
    10 600
    20 200
    30 200
    30 600
    30 300


    Required output should be

    The average of the three highest salaries exceeds 100, only those rows should be visible...wrt each addid.

    Thanks,
    Ketan

  2. #2
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,460

    Cool Elementary

    Nice homework assignment, what have you coded?

    HINT: Lookup ROW_NUMBER and/or DENSE_RANK analytical functions.
    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

Posting Permissions

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



Click Here to Expand Forum to Full Width