I would like to count first the number of row entries for every date then get the running total. This is for custom transformation in the Table Transformer Macro.
Example Data:
Date
4/4/2022
4/4/2022
4/4/2022
4/4/2022
4/6/2022
4/6/2022
4/6/2022
4/10/2022
Desired Output:
Date | Count | Running total
4/4/2022 | 4 | 4
4/6/2022 | 3 | 7
4/10/2022 | 1 | 8
I have tried:
SELECT 'Date',
COUNT(*) AS 'Count',
SUM('Count') OVER (ORDER BY 'Date') AS 'Running total'
FROM T*
GROUP BY 'Date'
ORDER BY 'Date';
and various other variations of this code but it does not work. I can successfully get the count but not running total.