Newbie frequency question

2001-04-19 Thread Graham Nichols
Hi, I have a list of words entered into a search engine held in a database. I wish to be able to select the top 10 words held in the database. I've fiddled around with ORDER DESC, DISTINCT and LIMIT etc but I can't hit upon the SQL syntax to obtain the correct result. Can someone please shine a

Re: Newbie frequency question

2001-04-19 Thread Peter Skipworth
select word, count(word) as c from tablename group by word order by c desc On Thu, 19 Apr 2001, Graham Nichols wrote: Hi, I have a list of words entered into a search engine held in a database. I wish to be able to select the top 10 words held in the database. I've fiddled around with

Newbie frequency question

2001-04-19 Thread Graham Nichols
Hi, I have a list of words entered into a search engine held in a database. I wish to be able to select the top 10 words held in the database. I've fiddled around with ORDER DESC, DISTINCT and LIMIT etc but I can't hit upon the SQL syntax to obtain the correct result. Can someone please shine a