How to use Min() and Max() in Linq SQL queries

Viewed 35

I am trying to translate this SQL query to link but can't figure out how to use Min() and Max() in the right way

SELECT
    MIN(r.[TimeStamp]) AS [TimeStamp], 
    r.ExerciseId, r.UserId, 
    MAX(r.Pr) AS Pr, 
    e.Name, u.FirstName, u.LastName, e.SubHeader, e.PrType
FROM
    [Record] r, Exercise e, [User] u
WHERE
    e.Id = r.ExerciseId 
    AND u.Id = r.UserId 
GROUP BY
    r.ExerciseId, r.UserId, e.Name, u.FirstName, u.LastName, e.SubHeader, e.PrType
0 Answers
Related