Skip to content

Sorting all data by date with Group By

This is my table.

I want to write a query that shows the flow of money by days.I wrote a query like this, but I have to specify the day:

This query works for the day I have specified. But how can I do this for all days. I get this result when I remove the date requirement:

enter image description here

I hope I was able to explain my problem.

Advertisement

Answer

Use conditional aggregation:

User contributions licensed under: CC BY-SA
8 People found this is helpful