I have an SQL column with values in a column and I would like to know which values occur the most in a ranked format. For example if I had data in a table called List and a column had values as seen below:
COLUMN
one
five
five
five
three
two
eight
nine
two
one
two
two
The sql should return the top 3 values which are Two, Five and One. How can this be done in SQL. Please note I am using MYSQL.
Also if each Column value had a time stamp on it is it possible to find out which value occurred the most during a week without having to manually enter the start and end of the week?