I am attempting to count number of records in a database by grouping them. This works fine, but when I try to order by, it orders the count by a different method than wanted. Example Result:
Question - Answer - Count
Q1 - A1 - 1
Q2 - A2 - 11
Q3 - A3 - 2
Result wanted: I want 11 after 2-9, not before. The query is simply:
SELECT Question, Answer, count(*) as `Count` GROUP BY Question, Answer ORDER BY Question, Answer
A further example of the sort is that the mysql sorts like, 1,11,118,12,2,3 where I am expecting the increasing value like 1,2,3,11,12,118