What does your query table look like?
Comment out the current query and run this one:
SELECT * FROM fake_apps
ORDER BY 3;
Now scroll down to 'Health and Fitness' and count them. 9
Next, scroll down to 'Sports' and count them. 11
Restore your original query. The table should output
9 for the 'Health and Fitness' row and
11 for the 'Sports' row.
Clearly we need the count of apps (category), not the sum of the downloads; but, I'm guessing you know that already. I would still be very interested in what you got from your query, before investigating myself. Do post, please.