473,386 Members | 1,835 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Sort, Limit then Sort

Hi, I am trying to do a query like:

(SELECT * FROM table1 ORDER BY frequency DESC LIMIT 50)
ORDER BY name;

Where the top 50 frequency values are then sorted by name. When I try
this, it displays each equal frequency value sub sorted by name (so all
freq = 50 are shown a-z, then all freq=40 shpwn a-z etc), rather than
showing the top 50 frequencies sorted by name which is what I want to
achieve.

Many thanks

Aug 11 '05 #1
0 1183

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
by: Max M | last post by:
There is a story today on Slashdot Open Source Project Management Lessons ======================================...
3
by: PWalker | last post by:
Hi, I have written code that I would like to optimize. I need to push it to the limit interms of speed as the accuracy of results are proportional to runtime. First off, would anyone know any...
8
by: yellow1912 | last post by:
Ok, lets say I have 1000 items in my database (mysql) and want to display X items per page. I learned to do it by querying with the LIMIT constrain (something like this...
5
by: Bill Reid | last post by:
Hello, I am a just-beyond-beginning user of Access 97 on a Windows 98se machine (a single, non-networked home machine). All of a sudden I am unable to sort any of my tables. I click on any...
1
by: bob.hughes | last post by:
I'm trying to write a query that will find multiple transactions that take place within a pre-determined time limit. I can easily compute the time between adjacent transactions and then judge...
6
by: Mark | last post by:
hi, i want to display the five most recent rows in my table (there is a timestamp), but sorted in ascending order. the problem is that when i call SELECT * FROM spam ORDER BY time ASC LIMIT...
4
w33nie
by: w33nie | last post by:
I want to sort the following table, that contains this data, in a .php page I'll use on my website. I want to sort it by a few columns too, I want it to sort by points, then difference, then for....
10
by: Woody Ling | last post by:
In 32 bits DB2 environment, is it meaningful to set sheapthres larger than 256MB for the following case.. 1. Intra-parallel is ON 2. Intra-parallel is OFF
20
by: Bill Waddington | last post by:
This must be a FAQ - or several FAQs - but I can't quite seem to pin it down. I need to read a string from stdin which I will then process as digits with sscanf. I need to limit the # of chars...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.