Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.
This repository was archived by the owner on Jan 28, 2021. It is now read-only.

Support SUM(something1) OVER (ORDER BY something2) syntax #758

Open
@zurk

Description

@zurk

There is a special window function in MYSQL to calculate complex aggregations.

For example, if you have a column with values [1, 1, 2, 2] and want to get cumulative sum, i.e [1, 1+1, 1+1+2, 1+1+2+2] You should run a query like

SELECT
    number, 
    SUM(number) OVER (ORDER BY date) AS cum_number 
FROM 
    table;

I am interested only in cumulative sum but there are more use cases (see https://mysqlserverteam.com/mysql-8-0-2-introducing-window-functions/)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions