
- Apache Drill Tutorial
- Apache Drill - Home
- Apache Drill - Introduction
- Apache Drill - Fundamentals
- Apache Drill - Architecture
- Apache Drill - Installation
- Apache Drill - SQL Operations
- Apache Drill - Query using JSON
- Window Functions using JSON
- Querying Complex Data
- Data Definition Statements
- Apache Drill - Querying Data
- Querying Data using HBase
- Querying Data using Hive
- Apache Drill - Querying Parquet Files
- Apache Drill - JDBC Interface
- Apache Drill - Custom Function
- Apache Drill - Contributors
- Apache Drill Useful Resources
- Apache Drill - Quick Guide
- Apache Drill - Useful Resources
- Apache Drill - Discussion
Window Function CUME_DIST()
The following program shows the query for this function −
Query
0: jdbc:drill:zk = local> select name,age,gender,cume_dist() over (order by age) as relative_rank from dfs.`/Users/../workspace/Drill-samples/student_list.json`;
Result
name age gender relative_rank Adam 12 male 0.7 Amit 12 male 0.7 Bob 12 male 0.7 David 12 male 0.7 Esha 12 female 0.7 Ganga 12 female 0.7 Leena 12 female 0.7 Jack 13 male 1.0 Mary 13 female 1.0 Peter 13 female 1.0
apache_drill_window_functions_using_json.htm
Advertisements