Hi have a table name is cou
name type
kasu 1
kasu 4
kasu 3
nimal 1
nimal 2
I need this answer as
name cnt
kasu 3
SELECT name, COUNT(name) AS `cnt`
FROM cou
GROUP BY name
ORDER BY `cnt` DESC
LIMIT 1
ok so, sorry, i didn't find something more elegant, so I did it the stupid way. There is definetly another way of doing it though...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With