count of max in mysql example query
Count is an aggregate function which returns the count of rows with respect to our query conditions.
Max is an aggregate function which returns the max of rows value of a particular column with respect to our query condition. For string which returns the maximum length value instead of occurences.
So you have to use count of max to get the more occurences of the same string in the mysql.
select searchkey,count(searchkey) as val from search where name='Hems' group by searchkey order by val desc limit 1
229 total views, 0 views today