"finding the mode"

  • Thread starter Thread starter deb
  • Start date Start date
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?
 
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)
 
Back
Top