I have a table that contains some data like below:
Id : 1,2,3,4,5,6,7,8,9,10
data: 3,2,3,2,5,3,2,3,5,1
And I want this output: 3,2,5,1
This means that MySQL check all data, count them, sort by count and return one of each data.
I try @mysql_query ('SELECT * FROM
datatableGROUP BY data');
But it returns an unsorted group data and I have repeated data like 3333222551