I want to return the 10 most common words from a query in SQL server, so running against a set of rows such as this:
quick brown fox
slow yellow fox
slow green fox
would return
fox
slow
quick
brown
yellow
green
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To see how to do this declaratively (i.e. without a
whileloop), see an answer I worked on (for a code golf of all things): Build an ASCII chart of the most commonly used words in a given textNote that the code in that link is intended to have the fewest characters possible, not to be readable. Please use more descriptive names, at least.