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

Support analytic NTILE function

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.11.0
    • Component/s: OLAP, Query Processor, UDF
    • Labels:
      None
    • Tags:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: