Sure - what is special about the first row that will allow the query to
recognize it and select it as opposed to selecting any of the other rows in
the group? You're going to have to provide some more information.
CREATE TABLE scripts (only include the minimum number of columns to enable
you to illustrate the problem) and insert statements for sample data, along
with a tabular representation of what the query is supposed to spit out will
go a long way toward getting this problem solved.