How can I program SQL Server 2000 to choose the first record in a sequence? For example ID VarA VarB 1 1 1 1 1 2 1 1 1 How do I select the first record in this sequence? The example I cited is just one example of a file which will have 300,000 plus records in it, so top 1 is not applicable. The file is sorted by an id number and by an amount spent descending...I would like to choose the record within each id that represents the maximum amount. The trouble is if an id has to item amounts which are equal, SQL pushes them both to the resulting recordset, when I only want the first one when there is a tie.