select description, min(date), max(date), sum(value1), sum(value2) from table
where description = 'Axxx' and filter = 'L'
group by description
How to perform this query using Linq / C#?
select description, min(date), max(date), sum(value1), sum(value2) from table
where description = 'Axxx' and filter = 'L'
group by description
How to perform this query using Linq / C#?
That should work
var q = from s in db.table
where description = 'Axxx' and filter = 'L'
group s by s.description into g
select new {YourDescription = g.description, MaxDate = g.Max(s => s.date) }
That answer may help, too .. here