View Single Post

   
  #2 (permalink)  
Old 02-28-2008, 09:10 AM
Captain Paralytic
 
Posts: n/a
Default Re: Need a query max_count()

On 14 Feb, 12:19, "Kesavan" <k7.in...@gmail.com> wrote:
> I have a column having 4,8,4,1,2,4,9,4,4,5,4,5,9,9,5, in a table...
>
> & need to retrive a number which occur at maximum times. ie here i
> need to retrive 4 [it occurs aboutsix times...]
>
> Please suggest me query...


Select `column`, count(*) `frequency`
from `table`
GROUP BY `column`
ORDER BY `frequency` DESC
LIMIT 1

Reply With Quote