 <p>Sadly a bit redundant due to MySQL's lack of a <code>WITH</code> statement, but this should do what you want. In case of a tie, it will return the higher answer.</p> <pre><code>SELECT s1.question_id, MAX(s1.answer) answer, MAX(s1.c) occurrences FROM (SELECT question_id, answer, COUNT(*) c FROM survey_result GROUP BY question_id,answer) s1 LEFT JOIN (SELECT question_id, answer, COUNT(*) c FROM survey_result GROUP BY question_id,answer) s2 ON s1.question_id=s2.question_id AND s1.c &lt; s2.c WHERE s2.c IS NULL GROUP BY question_id </code></pre> <p><a href="http://sqlfiddle.com/#!2/ddb55/2" rel="nofollow">An SQLfiddle to play with</a>.</p>