in general we can do it by grouping the data on the date column
it is describing a NON-LINQ and a LINQ approach