I am trying to get a MYSql instruction to spit out the most common number in a field. I believe that I have to use COUNT(QUANTITY), but I'm confused by that GROUP BYand ORDER BYI can not get the correct MODE (the most common number).
* EDIT *
Here is an example table:
QUANTITY | ORDER_NUMBER
1 51541
4 12351
5 11361
5 12356
6 12565
8 51424
10 51445
25 51485
The MYSql statement should spit out the number 5 , since it is most often found
Toddn source
share