I have a column (column1) in one of my MySQL tables in which many of the rows have duplicate values for column1. Is there any way to create a MySQL query to SELECT DISTINCT and then order by the number of occurences of the value in column1? Also, how can I retrieve the number of occurences of certain values in column1? Can this be done without using mysql_num_rows? Thank you
What about this code: SELECT column, count( column ) FROM table GROUP BY column ORDER BY count( column ) DESC Code (markup):