How do I execute this GROUP BY mysql query?
Translations
Englishالعربية
български
català
中文
čeština
dansk
Nederlands
eesti
suomi
français
Deutsch
Ελληνικά
עברית
हिंदी
magyar
Bahasa Indonesia
italiano
日本語
한국어
latviešu
lietuvių
norsk
polski
Português
română
русский
slovenčina
slovenski
español
svenska
ไทย
Türkçe
українська
Tiếng Việt
Suppose I have a table called "Fruits" with a column called "name".
name
--------
apple
orange
orange
orange
apple
grape
How can I execute a query to produce this:
orange 3
apple 2
grape 1
(Group by the name, and then sort them by their count)
This question and answers originated from www.stackoverflow.com
Question by TIMEX (6/1/2011 5:29:37 PM)
Answer |