mysql> select id, count(question_id) from question_choice group by question_id having count(question_id) > 30; +-------+--------------------+ | id | count(question_id) | +-------+--------------------+ | 11 | 240 | | 3300 | 240 | | 6589 | 241 | | 9879 | 240 | | 13170 | 240 | | 16459 | 240 | | 19748 | 240 | | 23037 | 238 | | 26324 | 238 | | 29611 | 240 | | 32900 | 241 | | 36190 | 240 | | 39479 | 240 | | 42768 | 228 | | 46045 | 240 | | 49334 | 240 | +-------+--------------------+ 16 rows in set (0.34 sec)