Thanks to everyone who Helped, Regards
Marty ----- Original Message ----- From: "Joseph Bueno" <[EMAIL PROTECTED]> To: "Martin Moss" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, July 24, 2003 3:56 PM Subject: Re: New Group By, order by question > select .... order by abs(field) desc; > > Hope this helps, > Joseph Bueno > > Martin Moss wrote: > > 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 > > > > > > > > > > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]