Avatar of Jess31
Jess31

asked on 

How to do in LINQ??

I am using vb.net. I have a data table with these columns:
Dep
Qty
Cost
Sales

In SQL I would do:
Select
Max(Dep) dep,
count(*) cnt,
Sum(qty) qty,
Sum(Cost*qty) Cost
Sum(sales*qty) Sales
From tbl
Group By dep
Order By dep

How can I do this in LINQ?
Visual Basic.NET.NET Programming

Avatar of undefined
Last Comment
Fernando Soto

8/22/2022 - Mon