469,087 Members | 1,277 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,087 developers. It's quick & easy.

New Group By, order by question

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/my***********...ie.nctu.edu.tw

Jul 19 '05 #1
0 1167

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Tom Loach | last post: by
reply views Thread by Tom Loach | last post: by
4 posts views Thread by Mike Nolan | last post: by
1 post views Thread by Thomas Qi | last post: by
reply views Thread by kglaser89 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.