- Apache Tajo - Custom Functions
- Apache Tajo - JDBC Interface
- OpenStack Swift Integration
- Apache Tajo - Integration with Hive
- Integration with HBase
- Apache Tajo - Storage Plugins
- Apache Tajo - SQL Queries
- Aggregate & Window Functions
- Apache Tajo - SQL Statements
- Apache Tajo - Table Management
- Apache Tajo - Database Creation
- Apache Tajo - JSON Functions
- Apache Tajo - DateTime Functions
- Apache Tajo - String Functions
- Apache Tajo - Math Functions
- Apache Tajo - SQL Functions
- Apache Tajo - Operators
- Apache Tajo - Data Types
- Apache Tajo - Shell Commands
- Apache Tajo - Configuration Settings
- Apache Tajo - Installation
- Apache Tajo - Architecture
- Apache Tajo - Introduction
- Apache Tajo - Home
Apache Tajo Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Aggregate & Window Functions
This chapter explains the aggregate and window functions in detail.
Aggregation Functions
Aggregate functions produce a single result from a set of input values. The following table describes the pst of aggregate functions in detail.
S.No. | Function & Description |
---|---|
1 | Averages a column of all records in a data source. |
2 | Returns the coefficient of correlation between a set of number pairs. |
3 | Returns the number rows. |
4 | Returns the largest value of the selected column. |
5 | Returns the smallest value of the selected column. |
6 | Returns the sum of the given column. |
7 | Returns the last value of the given column. |
Window Function
The Window functions execute on a set of rows and return a single value for each row from the query. The term window has the meaning of set of row for the function.
The Window function in a query, defines the window using the OVER() clause.
The OVER() clause has the following capabipties −
Defines window partitions to form groups of rows. (PARTITION BY clause)
Orders rows within a partition. (ORDER BY clause)
The following table describes the window functions in detail.
Function | Return type | Description |
---|---|---|
int | Returns rank of the current row with gaps. | |
int | Returns the current row within its partition, counting from 1. | |
Same as input type | Returns value evaluated at the row that is offset rows after the current row within the partition. If there is no such row, default value will be returned. | |
Same as input type | Returns value evaluated at the row that is offset rows before the current row within the partition. | |
Same as input type | Returns the first value of input rows. | |
Same as input type | Returns the last value of input rows. |