Results 1 to 2 of 2
  1. #1
    Join Date
    May 2011

    Unanswered: Help with percentile_disc


    I just started using SQL recently in an Oracle environment.

    I have the following code that returns a 99th percentile value for field_1.


    percentile_disc(0.99) within group (order by field_1) as "99% Count",

    FROM table

    WHERE date >= TO_DATE (2010)
    AND date < TO_DATE (2011)

    Sometimes however, I need the value for another field called field_2 that corresponds to the 99th percentile value for field_1. In other words, the value for field_2 that is right next to the 99th percentile value of field_1.

    If anyone could help it would be appreciated.


  2. #2
    Join Date
    Aug 2003
    Where the Surf Meets the Turf @Del Mar, CA
    Provided Answers: 1
    subordinate original SELECT into WHERE clause
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

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