Hi,
I was trying to achieve the following with LLBGen:
Tables:
Restaurant & Rating, linked via Restaurant.RestaurantId == Rating.RestaurantId
select top(1) *, (select AVG(1.0*Rating.Score) from Rating where Rating.RestaurantId = Restaurant.RestaurantId) as Score
from Restaurant
order by Score desc
(1.0* is done to get a decimal average instead of integer)
I want to retrieve the Dish with the heighest average rating. I know assume it's something with DbFunctionCall, but I've not used that enough to understand how to apply it in this situation.
LLBLGen 4.2, SelfServicing