Project-开发者_StackOverflow中文版 ID,Name
ProjectProgress - ID,ProjectID,ProgressID, Date
I need to get the Top 1 record for each Project, however i keep hitting a brick wall, does anyone have an idea how i can achieve this, I am trying to return
ProjectName, ProgressID
You didn't describe how to determine which record is the TOP 1. Is it the most recent date for each ProjectID?
If so, tell us what more you need after starting with this:
SELECT ProjectID, Max([Date]) AS MaxOfDate
FROM ProjectProgress
GROUP BY ProjectID;
精彩评论