txt3rob — 2014-07-01T09:57:20-04:00 — #1
I have a col called "Telephone No".
How would i find out the most popular number in the rows?
There is over 50 different telephone numbers in there.
wolfshade — 2014-07-01T10:54:54-04:00 — #2
txt3rob — 2014-07-01T11:00:57-04:00 — #3
Will a table structure do?
wolfshade — 2014-07-01T11:36:44-04:00 — #4
If those are column names, I personally never put spaces in column names. Use an underscore, at least. Or camelCase. Also, I wouldn't use things like parenthesis or other special characters in column names, either. Nor reserved words ("date", "UUID", etc.)
In order to see which number is called the most, I think some kind of metric is in order. An int column that incrementally increases every time a number is called would be the simplest.
Not knowing the context of your site/app, or other information, it is difficult to answer.
r937 — 2014-07-02T02:17:49-04:00 — #5
SELECT `Telephone No`
BY `Telephone No`
BY COUNT(*) DESC LIMIT 1
txt3rob — 2014-07-03T04:59:12-04:00 — #6
Deffo the SQL GURU!
THANK YOU AGAIN!