"finding the mode"

D

deb

I need a query to find the "mode" (or most frequently
occurring data) within a group. I know that it is
possible in Excel. Can anyone help?
 
D

david epsom dot com dot au

SELECT TOP 1 tbl.str
FROM tbl
GROUP BY tbl.str
ORDER BY Count(tbl.str) DESC;


more difficult of course if it's bi-modal... but then, isn't it always?

(david)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top