I have a table called Orders
the table has many rows but im only interested in two in particular.
I want to query the table so it returns the average ordered count of each product
i want to know what is the average count of the ordered products, but now in total but per productID instead.
How can this be done?
i tried this:
Dim ord = From e In db.Orders
Group e By e.ProductID Into grp
Select New With {.Id = e.ProductID, .Avg = grp.average}
but this does not work.
Solved it but had to wait for rep up.