You can use the following format using linq and lambda expressions
For Group By Day
var results = from p in db.table
group p.data by p.DateTime.UtcNow.Day into g
select new { Id = g.Key, parameters = g };
For Group By Week
var result = from p in db.table
group p.data by p.DateTime.UtcNow.DayOfWeek into g
select new { Id = g.Key, parameters = g}
or else
//get the 7days of the week by the below method and perform between operation
DateTime fromDate = DateTime.Today.Subtract(new TimeSpan(7, 0, 0, 0));
DateTime today = DateTime.Today;
var result = from p in db.table
group p.data by (DbFunctions.TruncateTime(today) && DbFunctions.TruncateTime(today) >= DbFunctions.TruncateTime(fromDate)) into g
select new { Id = g.Key, parameters = g}
similarly for Month
DateTime fromDate = DateTime.Today.Subtract(new TimeSpan(30, 0, 0, 0));
DateTime today = DateTime.Today;
var result = from p in db.table
group p.data by (DbFunctions.TruncateTime(today) && DbFunctions.TruncateTime(today) >= DbFunctions.TruncateTime(fromDate)) into g
select new { Id = g.Key, parameters = g}