• if i go woth your suggestion then i need to group it by the other non aggregated columns, if i group it my results will go wrong, so i am thinking to use min(column1) over (order by column1) .

    What other columns, there were non specified? Why will the results be wrong, in what way?

    Sorry but without a little more information (i.e. DDL's and sample data would be perfect) we just can't see based upon this sorry..

    Cheers

    Andy

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe