Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004
    Posts
    83

    Unanswered: Can I get an N count while using Perentile_Cont

    SELECT jobcode, PERCENTILE_CONT(0.5)
    WITHIN GROUP (ORDER BY salary DESC) MEDIAN_CONT
    FROM employees
    GROUP BY jobcode;


    I have a query where I am calulating percentile salary for employees with the same jobcode.

    The percentiles are great, but I also need to know the number of employees by jobcode within the same statement.

    So for example, the query above returns

    jobcode comprate
    1111222 54212.00
    0000011 23111.12

    But I would also like a N count of employees.

  2. #2
    Join Date
    Jan 2004
    Posts
    83
    Answered my own question. I did not think added COUNT to the query would actually work and not break my groupings. Brain freeze....

Posting Permissions

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