ORDEY BY ... Count (1 Viewer)

DrZoidberg

Registered User.
Local time
Today, 22:58
Joined
Jan 12, 2005
Messages
14
Hi, is there anyway to perform a query and have it order by the count? I thought it was possible but keep getting an error. I'm using the following:

SELECT st_term, COUNT(st_term) AS QueryCount FROM tblSearchTerms GROUP BY st_term ORDER BY QueryCount

Any help would be *hugely* appreciated.

Many thanks.
 

namliam

The Mailman - AWF VIP
Local time
Today, 23:58
Joined
Aug 11, 2003
Messages
11,695
include the count statement not the alias...
 

DrZoidberg

Registered User.
Local time
Today, 22:58
Joined
Jan 12, 2005
Messages
14
great, thanks!!
 

Users who are viewing this thread

Top Bottom