Hi Martin,
I understand the ABS() function is used for this. Best regards Nils Valentin Tokyo/Japan 2003年 7月 24日 木曜日 23:42、Martin Moss さんは書きました: > All, > > I have a question about grouping numbers. > > Lets say I have 10 records each containing a numeric value:- > > 1 > 2 > 3 > 5 > 10 > -1 > -2 > -3 > -4 > -5 > > What I wish to do is to select the records from the database but group them > like this :- > e.g. by the highest value (ASC or DESC) regarldess of whether the value is > positive or negative? > > 10 > 5 > -5 > -4 > 3 > -3 > 2 > -2 > 1 > -1 > > Can I do this in one query, or do I need to make two queries > > Regards > > Marty -- --- Valentin Nils Internet Technology E-Mail: [EMAIL PROTECTED] URL: http://www.knowd.co.jp Personal URL: http://www.knowd.co.jp/staff/nils -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]