I\'m trying to perform groupby with aggregate function inside a subquery using lambda expression .I\'ve manage to write the query using SQL but failing to do the same using Lamb