Re: Selecting count and distinct

2005-03-08 Thread John Nichel
[EMAIL PROTECTED] wrote: Try something that looks like: SELECT searchTerms, Count(1) as frequency FROM your_table_name_here GROUP by searchTerms ORDER BY frequency DESC LIMIT 10; That will give you the 10 most frequently appearing searchTerms in the table "your_table_name_here". The GROUP BY br

Re: Selecting count and distinct

2005-03-08 Thread SGreen
John Nichel <[EMAIL PROTECTED]> wrote on 03/08/2005 04:40:00 PM: > Hi all, > > I have a table which contains amoung other things, search terms used on > our web site. What I'm trying to do is select the count of distinct > search terms in one query. I think this is possible, but I can't seem

Selecting count and distinct

2005-03-08 Thread John Nichel
Hi all, I have a table which contains amoung other things, search terms used on our web site. What I'm trying to do is select the count of distinct search terms in one query. I think this is possible, but I can't seem to get the syntax quite right. I've tried things like the following SE