php - Query a table for duplicate entries -


i use query make tag cloud popular search terms:

$query = "select search_time                , search_keywords           phpbb_popsearch2           order search_time desc           limit 120"; 

i want remove search terms aren't used enough in tag cloud. restrict queries search_keywords appears @ least 10 times in phpbb_popsearch2.

what best way without adding second query every time first 1 executed?

perhaps can select/group search_keywords having # of entries count >= 10.

select         search_keywords             phpbb_popsearch2     group         search_keywords     having          count(*) >= 10