Good day. There is such a structure:
id | date 1 | 01.01.2017 2 | 01.01.2017 1 | 02.01.2017 3 | 02.01.2017 4 | 03.01.2017 1 | 03.01.2017 2 | 04.01.2017 5 | 04.01.2017 5 | 05.01.2017 2 | 05.01.2017 ....... It is necessary to obtain consolidated data with cumulative totals, namely:
date | count 01.01.2017 | 2 02.01.2017 | 3 03.01.2017 | 4 04.01.2017 | 5 05.01.2017 | 5 T.e. for each unique date it is necessary to take the sum of unique ID with a cumulative result. I know how to do this by writing a function. But brute force to do this task is not true. How can I do this in one request?