• Are you actually using SQL 2000 (or 7), as per the forum, or do you have a more recent version available? Which solution to use depends on that.

    If it's actually 2000, then you need to write one query that pulls the Max() score for each quiz, and then join that to the data so you can get the non-aggregate rows.

    If it's 2005 or later, you can query the quizzes and use Outer Apply to get the top row for each. (Use Outer instead of Cross, if you want to show quizzes that don't have top scores yet. Use Cross Apply if you want to leave those off.)

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon