Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-952

Support analytic NTILE function

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.11.0
    • OLAP, Query Processor, UDF
    • None
    • NTILE analytic function RANK DENSE_RANK

    Description

      The NTILE function divides a set of ordered rows into equally sized buckets and assigns a bucket number to each row.
      Useful for calculating tertiles, quartiles, quintiles, etc.

      Example:

      SELECT last_name, salary,
      NTILE(4) OVER (ORDER BY salary DESC) AS quartile
      FROM employees
      WHERE department_id = 100;
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              cwsteinbach Carl Steinbach
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: